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 c68924d5c8
commit 36fd9d5e18
1 changed files with 1 additions and 1 deletions

View File

@ -3259,7 +3259,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 ) {