-->
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: How do i make Object detatched from the session and use it
PostPosted: Sat Apr 04, 2009 8:29 am 
Newbie

Joined: Thu Mar 05, 2009 2:50 am
Posts: 14
Can any one tell me how to detach an object after i load() it from the session and use it seperately from the session, how do i make the state of the object as detach from the session with out using the evict() method.

Thanks and Regards
Ramakanth

_________________
Thanks and Regards


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 05, 2009 5:00 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Quote:
how do i make the state of the object as detach from the session with out using the evict() method


I am not sure I understand the question. Session.evict() detaches a single object from a session, Session.clear() detaches all objects from the session, and Session.close() closes the session and as a "side-effect" also causes all objects to be detached.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 05, 2009 10:05 pm 
Beginner
Beginner

Joined: Sun Dec 28, 2008 6:01 pm
Posts: 24
Could you please explain why don't you want to use Session#evict() for detaching a single object?


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.