-->
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.  [ 1 post ] 
Author Message
 Post subject: cascade="save-update" and Evict()
PostPosted: Tue Feb 19, 2008 12:39 pm 
Newbie

Joined: Tue Oct 24, 2006 2:51 pm
Posts: 19
Hibernate version:
1.2 GA
Mapping documents:
n/a
Code between sessionFactory.openSession() and session.close():
n/a

Hi, i was wondering if my considerations are wrong: in particular, i doesn't understand why to make Evict() actually evicts all the associations and entities in collection of an object, i have to set each association or collection cascade="all-delete-orphans"

Actually i found in a lot of scenarios that Evict() is needed to detach all the object graph from the session (e.g. for Remoting / WCF / websrv), and then reattach the object graph with lock() or Update () (that are supposed to work as Evict())

So, why i need to set this cascade? a Customer on an Inovice is better suited for a save-update, and not a all-delete-orphan, but at the same time i can need the Evict() and Lock() that works on the entire object graph

Am i missing something? I hope so.

thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.