-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: two one-to-many associations vs composite elemnt class
PostPosted: Wed Aug 02, 2006 1:32 pm 
Beginner
Beginner

Joined: Thu May 18, 2006 2:58 pm
Posts: 28
It is written in HiA on several occasions that the use of a composite class can lead to unnecessary complexity and implementing two one-to-many associations on entity classes might be easier. (See HiA p.197, 220, 225, 231).

I have a case almost exactly like the example on p. 230, a link table with extra data (comment, timestamps, etc). The hbm.xml mapping generation tool created a composite class.

When is the appropriate time to use a composite class?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 02, 2006 11:32 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
The book also explains in very much detail _when_ a particular mapping is appropriate or when a different mapping might be easier. Since you do not have a question about the book per se, please post in the regular User forum.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.