-->
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.  [ 4 posts ] 
Author Message
 Post subject: Can Hibernate update the main object but not the collection?
PostPosted: Mon Mar 12, 2007 10:41 am 
Newbie

Joined: Mon Mar 12, 2007 10:35 am
Posts: 2
Hi, we are running Hibernate 3.0.5. We have a defined an object, which contains collections of other objects. When we update the main object through Hibernate, Hibernate updates all of the objects in the collections as well. Is there a way to update the main object, but not the collections?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 12, 2007 11:23 am 
Beginner
Beginner

Joined: Mon Aug 22, 2005 9:57 pm
Posts: 27
cascade="none"


Top
 Profile  
 
 Post subject: Cascade
PostPosted: Mon Mar 12, 2007 11:29 am 
Regular
Regular

Joined: Wed Aug 24, 2005 11:49 am
Posts: 63
What are your cascade options?

_________________
Edwin van der Elst
Finalist IT Group


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 12, 2007 12:37 pm 
Newbie

Joined: Mon Mar 12, 2007 10:35 am
Posts: 2
I'm using "all"

<bag name="roles" inverse="true" cascade="all, delete-orphan" lazy="false">


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