-->
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.  [ 2 posts ] 
Author Message
 Post subject: First Level Query Cache
PostPosted: Fri Sep 14, 2007 8:41 am 
Beginner
Beginner

Joined: Fri Apr 20, 2007 1:07 am
Posts: 23
Hi All,

Using Hibernate Annotations 3.3.0

I got a requirement whereing I got to execute the same query twice within a method....However, as I have noticed that once the first query has been executed, the second query execution though if it hits the database, the entities are loaded from the memory.....After the first query execution, the entities loaded via that are modified a bit....

I presume this is standard Hibernate behaviour but is there any way that I can turn off this behaviour ?

Thanks for the suggestions.

Regards...Vijay


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 17, 2007 1:16 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Try the statelessSession, alternatively session.refresh(entity) is the solution

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.