-->
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: Entity with multiple ManyToOne Relation and a JoinTable
PostPosted: Thu Jul 05, 2007 9:43 am 
Newbie

Joined: Fri May 11, 2007 9:52 pm
Posts: 4
Hello,

I use Hibernate 3.2.

I have found a problem with an entity and multiple ManyToOne Reletionships if I use a JoinTable.
As shown in the example, I got 2 ManyToOne Relationships. These are bound to one JoinTable, but different columns.
It seems, that Hibernate binds this JoinTable always to the last declared ManyToOne Annotation.

Is there a way to solve this problem?


Example:

Entity A

1. ManyToOne (JoinTable="MyJoinTableA", JoinColumn="myid", Inverse="columen_a")
...

2. ManyToOne (JoinTable="MyJoinTableA", JoinColumn="myid", Inverse="columen_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.