-->
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.  [ 5 posts ] 
Author Message
 Post subject: all-delete-orphan on collections tied to detached parent
PostPosted: Mon May 24, 2004 5:29 am 
Newbie

Joined: Mon May 24, 2004 3:51 am
Posts: 9
Hi

I want to automatically delete some persistent objects from a collection using the


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 5:33 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Are you replacing the collection, e.g. using setChildren(new HashSet())? You have to keep the original Hibernate collection.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 5:41 am 
Newbie

Joined: Mon May 24, 2004 3:51 am
Posts: 9
Yes I am replacing the collection. The parent is charged in a different session then transfered to a different tier. So when I return to persistance tier I want to save the updated object with its collection modified I just make saveOrUpdate (this is in a different session)


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 5:44 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
all-delete-orphan only works when the collection in question is the original Hibernate collection.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 5:50 am 
Newbie

Joined: Mon May 24, 2004 3:51 am
Posts: 9
ok. thanks a lot


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