Make sure the discriminator path uses the correct table group

This commit is contained in:
Christian Beikov 2022-03-15 08:38:10 +01:00
parent 20564a5547
commit b227475489
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public class DiscriminatorSqmPath extends AbstractSqmPath implements SelfInterpr
boolean jpaQueryComplianceEnabled) {
assert entityDescriptor.hasSubclasses();
final TableGroup tableGroup = sqlAstCreationState.getFromClauseAccess().getTableGroup( getLhs().getNavigablePath() );
final TableGroup tableGroup = sqlAstCreationState.getFromClauseAccess().getTableGroup( getNavigablePath().getParent() );
final ModelPartContainer modelPart = tableGroup.getModelPart();
final EntityMappingType entityMapping;
if ( modelPart instanceof EntityValuedModelPart ) {