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.htmlThis 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.