HHH-18017 Fix discriminator in shallow query cache check

This commit is contained in:
Marco Belladelli 2024-04-29 10:12:58 +02:00
parent ad3d985b52
commit 1fe8b3c0d5
1 changed files with 1 additions and 1 deletions

View File

@ -609,7 +609,7 @@ public class EntityInitializerImpl extends AbstractInitializer<EntityInitializer
EntityPersister entityDescriptor) EntityPersister entityDescriptor)
throws WrongClassException { throws WrongClassException {
if ( discriminatorAssembler == null if ( discriminatorAssembler == null
|| rowProcessingState.isQueryCacheHit() && !entityDescriptor.storeDiscriminatorInShallowQueryCacheLayout() ) { || rowProcessingState.isQueryCacheHit() && entityDescriptor.useShallowQueryCacheLayout() && !entityDescriptor.storeDiscriminatorInShallowQueryCacheLayout() ) {
return entityDescriptor; return entityDescriptor;
} }
else { else {