-->
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: many to many foreign keys
PostPosted: Wed Feb 25, 2004 10:55 pm 
Beginner
Beginner

Joined: Wed Dec 03, 2003 2:43 pm
Posts: 22
If I have tableA with id "a_ID" and tableB with id "b_ID" and property "b_PROP" and many to many lookup table with properties "a_ID" and "b_PROP" is there any way I can map this many to many relationship with Hibernate?

My understanding is the collection key would have to be "a_ID". The column property in the many to many association would be the "b_prop" of the lookup table, but I don't see where I can stop it from using b_ID when linking to tableB. Can I use collection index for this or is this just not doable?

Thanks,
Gabe


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2004 7:01 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Have a look at property-ref attribute. I don't know if it will fit you needs, anyway.

_________________
Emmanuel


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.