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: bug? result of 'join fetch' query is incorrectly cached
PostPosted: Wed Feb 10, 2010 2:03 am 
Newbie

Joined: Wed Feb 10, 2010 1:49 am
Posts: 1
Hi, Im not sure if this is either a bug, a missing option, or just an option that i can't find.

Im using hibernate 3.3.2, and EhCache 1.2.3.

I recently had an issue where objects in collections were getting dropped from the cache. After a long investigation, I found that it was because a "join fetch" query was being made on the parent object. http://docs.jboss.org/hibernate/core/3. ... ryhql.html

This meant that only a subset of the child elements were selected. If the collection was not already in the cache, the "incomplete" result of this query is put into it. Every subsequent call to the parent element (wanting the "full" set of children) would only get this incomplete version. When the incomplete version drops out of the cache (after 24 hours) everything goes back to normal.

So, is it a bug? Should hibernate (or ehcache) not be caching this "incomplete" collection? Or is there some way to tell hibernate that it is an incomplete collection _so_ that it doesnt get cached?

Note: I have resolved my issue just by removing the "fetch" keyword, which was introduced "pre-introduction-of-the-cache" for performance reasons.


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.