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 5c51ff93c6
commit aa7575aabd
1 changed files with 1 additions and 1 deletions

View File

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