-->
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: hibernate refuses to use second level cache
PostPosted: Thu Sep 28, 2006 5:54 pm 
Beginner
Beginner

Joined: Fri Sep 01, 2006 3:35 pm
Posts: 21
Hibernate version:
3.1

i followed these instructions:
http://www.devx.com/dbzone/Article/29685/
the only difference is that i use my own class, but that shouldn't matter.

i managed to get the cache filled (at the first execution of my simple query), but hibernate doesn't even try to get an object from the cache the second/third etc. time it executes the query. the query cache works perfeclty - what could be wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 30, 2006 10:12 am 
Regular
Regular

Joined: Wed Jul 27, 2005 2:33 am
Posts: 118
Hibernate will check the second level cache only when you use the get() API available on Session. If you are querying using HQL then the second level cache will not be used for finding the object.

Here's an article for more details:

http://www.javalobby.org/java/forums/t48846.html


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.