-->
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: "Found shared references to a collection" with components
PostPosted: Wed Sep 09, 2009 6:46 pm 
Newbie

Joined: Wed Sep 09, 2009 6:23 pm
Posts: 1
This situation is easy to work around but I'm curious if this is a bug, or if someone knows why this behaves this way. I have a complicated component structure, because I'm using JAXB created entities, and want to minimize modifications to generated code.

The structure that got me into trouble was

Component root contains Component A under two different properties, firstA and secondA.
Component A has a list (a bag of composite-element's) of Component B. Each list is mapped to a different table.

If I construct root by adding the same instance of Component A to root, when I saved I'd get a "Found shared references to a collection". If I construct two different instances of A, this works, even though the B's are the same instance. I would have thought since these were all components, this would all work... it correctly can figure out that the A's or B's should be treated as if they were separate instances, but the fact that there's a collection leads to an error.

Anyone get this?


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.