-->
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: composite keys with annotations
PostPosted: Wed Aug 27, 2008 5:51 pm 
Newbie

Joined: Thu Aug 07, 2008 4:35 pm
Posts: 9
How do i declare an attribute to be a part of the composite key?

I'm using the article http://boris.kirzner.info/blog/archives/2008/07/19/hibernate-annotations-the-many-to-many-association-with-composite-key/ as a reference to create a join table between 2 classes but i need to add another attribute to the composite key to avoid constraint issues.

I added another attribute in the join class that i want to be unique to the 2 composite keys but those keys can repeat. Since this data will be managed by me, the easiest way to solve this is to make all 3 attributes a composite key.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 30, 2008 12:27 pm 
Newbie

Joined: Thu Feb 14, 2008 10:43 pm
Posts: 8
http://forum.hibernate.org/viewtopic.php?t=989016


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.