|
Recent commit to DefaultInitializeCollectionEventListener caused that even if a collection is found in cache sql query is executed. It works as expected when you have trace logging enabled.
if ( foundInCache && traceEnabled )
{
LOG.trace( "Collection initialized from cache" );
}
else {
if ( traceEnabled )
{
LOG.trace( "Collection not cached" );
}
// database hit
ce.getLoadedPersister().initialize( ce.getLoadedKey(), source );
}
should be
if ( foundInCache ) {
if(traceEnabled)
{
LOG.trace( "Collection initialized from cache" );
}
} else {
|