Skip to content

Commit 2160dd8

Browse files
committed
HHH-18017 Fix discriminator in shallow query cache check
1 parent 8432d65 commit 2160dd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/sql/results/graph/entity/AbstractEntityInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ else if ( concreteDescriptor != null
378378
private EntityPersister determineConcreteEntityDescriptor(RowProcessingState rowProcessingState)
379379
throws WrongClassException {
380380
if ( discriminatorAssembler == null
381-
|| rowProcessingState.isQueryCacheHit() && !entityDescriptor.storeDiscriminatorInShallowQueryCacheLayout() ) {
381+
|| rowProcessingState.isQueryCacheHit() && entityDescriptor.useShallowQueryCacheLayout() && !entityDescriptor.storeDiscriminatorInShallowQueryCacheLayout() ) {
382382
return entityDescriptor;
383383
}
384384
else {

0 commit comments

Comments
 (0)