-->
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: bidirectional association commit issues.
PostPosted: Thu Jun 08, 2006 8:50 pm 
Newbie

Joined: Thu Jun 08, 2006 8:32 pm
Posts: 1
Hi, I am having an issue with a commit that should not happen. I have a one to many association between A and B. When I create an instance of A it somehow gets placed in the current session. I tried removing any association to A from B's collection of A and removing B from A. When I flush and commit, A somehow gets committed. How can this be? Any help would be greatly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 08, 2006 11:27 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
I think that you're saying that B contains a collection of As? Is that right? If you're creating an item in a collection owned by a persitent object, then that item will be written to the DB unless you have the inverse="true" attribute on the collection.

_________________
Code tags are your friend. Know them and use them.


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