This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes ORM Frameworks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
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
It is sorta covered in the JavaRanch Style Guide.
subject: ORM Frameworks