I’ve been thinking of converting our object model to using Hibernate instead of our proprietary persistence framework. Though I like our current implementation, it is difficult to understand and the mapping between domain object and database is done in code instead of a configuration file.

I’m having a difficult time determining if Hibernate can handle a single domain object being stored in three tables. I’ll do some experiments on this.


2 thoughts on “Hibernate

  1. My (limited) experience seems to back that up – one table = one object. That said, use a Data Mapper/DAO and hide the persistence method, then have your Hibernate implementation merge an object together. Hibernate does have good support for object relationships which might do what you want (for example you load a team and Hibernate can lazy load all the player objects for you too).
    Personally I’ve never used the object-across-three-tables approach primarily due to the performance issues concerning joins.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s