-->
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.  [ 1 post ] 
Author Message
 Post subject: Mapping a join table with additional columns
PostPosted: Sat Dec 12, 2009 6:17 pm 
Newbie

Joined: Sat Dec 12, 2009 5:54 pm
Posts: 1
I know this issues has already been discussed. But i still have a question about this. I have two tables A & B and a thrid table C which is a join table holding the association between A and B. I did mapping for this scenario and it works fine. Now, i need to add few more columns to the join table. The example in Christian Bauer book suggests to create an additional class for the join table and use a component mapping. It also says the new columns that are being added to the join table should be part of the composite primary key. I am not clear about this condition. What if i don't want to make the new column(s) as part of PK?. Currently, the composite PK of my join table is the FK id columns of table A and B.


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

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.