From b300b9d45ac6d8de8a5db76599287492303240ba Mon Sep 17 00:00:00 2001 From: Marco Belladelli Date: Mon, 25 Mar 2024 12:00:40 +0100 Subject: [PATCH] HHH-17857 Use `fromNameExact` when determining actual table group --- .../org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java index 79812ae045..e1afa15e3f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/sql/BaseSqmToSqlAstConverter.java @@ -3254,7 +3254,7 @@ public abstract class BaseSqmToSqlAstConverter extends Base // then we want to return the PluralTableGroup instead if ( lhsTableGroup instanceof PluralTableGroup && !( path instanceof SqmPluralPartJoin ) - && CollectionPart.Nature.fromName( path.getNavigablePath().getLocalName() ) == null ) { + && CollectionPart.Nature.fromNameExact( path.getNavigablePath().getLocalName() ) == null ) { final TableGroup elementTableGroup = ( (PluralTableGroup) lhsTableGroup ).getElementTableGroup(); // The element table group could be null for basic collections if ( elementTableGroup != null ) {