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

View File

@ -79,7 +79,7 @@ public SqmPathInterpretation<?> interpret(
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 ) {