-->
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: Found shared references to a collection error
PostPosted: Tue Jan 19, 2010 8:00 pm 
Newbie

Joined: Tue Dec 15, 2009 4:35 pm
Posts: 4
I know why this is happening. I have identified the cause of the error. Problem is, I want it to happen.

Code:
          ITEM1
         /      \
        /        \
STATICDATA1  DYNAMICDATA1

          ITEM2
         /      \
        /        \
STATICDATA1  DYNAMICDATA2


I find all ITEMS and for each ITEM, I retrieve their Static and Dynamic data. I know Dynamic will be unique across the board, but many Item might share the same Static

I have OneToMany relationships between ITEM and STATIC, and between ITEM and DYNAMIC.

What can I do to prevent the shared reference error?

Thank you


Top
 Profile  
 
 Post subject: Re: Found shared references to a collection error
PostPosted: Wed Jan 20, 2010 8:32 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Do your really have a OneToMany relation between ITEM and STATIC? It would imply that there is a ManyToOne relation from STATIC to ITEM (even if you have not declared it). In other words, a STATIC instance can belong to at most one ITEM instance. Can you post the mapping/code that is relevant?


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.