-->
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: disable object from being updated
PostPosted: Fri Nov 18, 2005 8:23 am 
when I create object A I use object B to validate some details. I also set A's foreign key id to B's Id

when saving object A I dont want to save object B cause it should not be altered.. only using it for validation.

How can I achieve this ?

Jaded


Top
  
 
 Post subject:
PostPosted: Mon Nov 28, 2005 2:12 pm 
Newbie

Joined: Thu May 26, 2005 1:14 pm
Posts: 1
Location: Italy
You can use Session.Evict(object).
After this call, "object" will never sincronize to database.

_________________
--
Giancarlo Sudano


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 29, 2005 8:15 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
Doesn't Evict() remove the object from the session cache? If so, is there a way to leave it in the cache (in case it's needed often) but not consider it when flushing (because it's almost never updated)?


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.