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.  [ 3 posts ] 
Author Message
 Post subject: Does Cascade="none" mean fully manual?
PostPosted: Thu Aug 07, 2008 1:39 pm 
Beginner
Beginner

Joined: Mon Feb 04, 2008 7:36 pm
Posts: 31
Using version 1.2.1

I have some collections that I have set to cascade=none. I don't see a way to tell nHibernate to update the collection as a whole.

It appears that I have to cycle through each item in the collection and do whatever needs to be done (i.e. save, update, delete) for the items. Is this correct or did I miss some other save method?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 08, 2008 2:34 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
No, you missed nothing. If you're talking about detached objects, ou have to iterate and save/update each changed item. If your objects are already in the session (from a former load) and you make only updates they should be persisted with the next commit/flush without calling update before.

_________________
--Wolfgang


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 08, 2008 9:08 am 
Beginner
Beginner

Joined: Mon Feb 04, 2008 7:36 pm
Posts: 31
Thats what I thought, kind of a pain but I think it will make partial collection loading more feasible.

Thanks for the response.


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