-->
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.  [ 3 posts ] 
Author Message
 Post subject: One column to multiple columns of different tables
PostPosted: Sun Feb 15, 2004 9:02 pm 
Beginner
Beginner

Joined: Wed Jan 28, 2004 2:06 am
Posts: 33
This problem was posted earlier. But there was no solution to this. I would appreciate if somebody can point me to the right direction.


The diagram is like that: B <-*------ A ------*--> C

But when I try so make some operation with C the following exception is raised by the persistence layer:

"...Found shared references to a collection"



The descriptor of A is the following:

<hibernate-mapping>
<class name="A" table="a">
<id name="oid" type="long" column="id" unsaved-value="0" >
<generator class="identity"/>
</id>

<set name="bs" inverse="false" >
<key column="id_a"/>
<one-to-many class="b"/>
</set>

<set name="cs" inverse="false" ">
<key column="id_a"/>
<one-to-many class="c"/>
</set>

</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 16, 2004 3:38 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Are you using the same collection for bs and cs ?
You must not.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 16, 2004 11:38 am 
Beginner
Beginner

Joined: Wed Jan 28, 2004 2:06 am
Posts: 33
Hi:

I got the problem. i was returning the same collection.


Thanks


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