-->
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: Is there way to avoid extra lookup if object already in ses?
PostPosted: Tue May 03, 2005 9:01 pm 
Regular
Regular

Joined: Thu Sep 09, 2004 6:46 pm
Posts: 96
Hibernate version: 3.0.2

How can I load an object using it's alternate key in such a way that if it is already in session the db lookup will not be done and it will use what's in session instead. The alternate key here consists of three fields and I have implemented the equals() using the three fields?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 04, 2005 4:11 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
through query caching

_________________
Emmanuel


Top
 Profile  
 
 Post subject: But the object in my case was never queried...
PostPosted: Wed May 04, 2005 9:11 am 
Regular
Regular

Joined: Thu Sep 09, 2004 6:46 pm
Posts: 96
But the object in my case was never queried... I created the object in open session in order to save it and later on on a loop I want to know if the object has been already created in which case I would use it or otherwise I would know that I have to create it.

So is there a mechanism for that?


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.