-->
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: query the session cache without db access?
PostPosted: Fri Jan 08, 2010 10:11 am 
Newbie

Joined: Thu Jan 07, 2010 8:08 am
Posts: 3
Hi,
I wonder if there is a way to ask the open session if a given object is inside of the session cache without a select to the database if its not available in cache?

Regards, Christian


Top
 Profile  
 
 Post subject: Re: query the session cache without db access?
PostPosted: Sun Jan 10, 2010 2:11 pm 
Newbie

Joined: Wed Dec 23, 2009 12:38 pm
Posts: 14
Try with contains(Object obj). If it returns true, object is associated with session.


Top
 Profile  
 
 Post subject: Re: query the session cache without db access?
PostPosted: Sun Jan 10, 2010 2:55 pm 
Newbie

Joined: Thu Jan 07, 2010 8:08 am
Posts: 3
Thank you very much!
It was exacly what i was searching for!


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.