File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes ORM Frameworks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ORM Frameworks" Watch "ORM Frameworks" New topic

ORM Frameworks

Anil Vupputuri
Ranch Hand

Joined: Oct 31, 2000
Posts: 527

Does your book mention any pitfalls or antipatterns related ORM frameworks such as Hibernate.


SCJP 1.5, SCEA, ICED (287,484,486)
Bill Karwin
Ranch Hand

Joined: Aug 02, 2010
Posts: 32
Hi Anil, your question is related to the question Wouter asked earlier.

I have a chapter describing how some ORM users confuse "model" with "table," and this confusion impacts their application design. Martin Fowler calls this the Anemic Domain Model:

The confusion between model and table is pretty common in the Ruby, PHP, Python, and Perl developer communities, but I haven't found this to be as much of a problem in the Java community.

My advise is to decouple the model from the database access object. Treat them as two separate objects.

Bill Karwin is the author of SQL Antipatterns: Avoiding the Pitfalls of Database Programming
I agree. Here's the link:
subject: ORM Frameworks
jQuery in Action, 3rd edition