-->
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.  [ 4 posts ] 
Author Message
 Post subject: Composite IDs and many-to-many relationships
PostPosted: Fri May 04, 2007 11:04 am 
Newbie

Joined: Fri May 04, 2007 10:54 am
Posts: 4
Hi everyone,

I think there is a bug with the detection of many-to-many relationships if a primary key consists of more than one field.
An example:
One of two tables (table 'A') of a many-to-many relationship has a primary key consisting of two attributes.
The generated B.hbm.xml for the table 'B' contains this:


<set name="as" inverse="true" table="a_b">
<key>
<column name="b_id" not-null="true" />
</key>
<many-to-many entity-name="test.A">
<column name="a_id1" not-null="true" />
</many-to-many>
</set>


but there should be another entry for the referenced primary key:
<column name="a_id2" not-null="true" />

I'm using Hibernate Tools beta 9a

Bye
Markus


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 04, 2007 2:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
report in jira with an attached test case.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 04, 2007 3:20 pm 
Newbie

Joined: Fri May 04, 2007 10:54 am
Posts: 4
OK, I've reported it in jira

http://opensource.atlassian.com/project ... se/HBX-939


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2007 10:27 am 
Beginner
Beginner

Joined: Mon Mar 07, 2005 6:23 pm
Posts: 21
Mark, did you ever come up with a way around this problem or did you just fix it manually?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.