-->
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.  [ 1 post ] 
Author Message
 Post subject: query-time cache preferences
PostPosted: Fri Mar 26, 2004 1:10 pm 
Newbie

Joined: Fri Mar 26, 2004 1:01 pm
Posts: 12
Is it possible to change the 2nd-level (entity) caching used for a particular query? For most work, I want Hibernate to cache as I specified in the xml files. But there are a few queries where I need much tighter control (I'm in a clustered environment, and would like to get to guarantee that I'm reading correct data (clustered environment), and/or serializable isolation).

Something like this:
Code:
session.createQuery("from Foo").setCachedEntities(false).list();


Then I could get what I want without creating another session. Most of the time I'd only need this for fetching entities by ID, but occasionally it would be really helpful for full queries.

Such a system would read the entities into the L2 cache to insure that the application was consistent, too.

Thoughts?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.