HHH-17857 Use `fromNameExact` when determining actual table group

This commit is contained in:
Marco Belladelli 2024-03-25 12:00:40 +01:00 committed by Marco Belladelli
parent 8277ae8ccd
commit b300b9d45a
1 changed files with 1 additions and 1 deletions

View File

@ -3254,7 +3254,7 @@ public abstract class BaseSqmToSqlAstConverter<T extends Statement> 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 ) {