use of org.hibernate.query.sqm.sql.internal.DiscriminatorPathInterpretation in project hibernate-orm by hibernate.
the class DiscriminatorSqmPath method interpret.
@Override
public SqmPathInterpretation<?> interpret(SqlAstCreationState sqlAstCreationState, SemanticQueryWalker sqmWalker, boolean jpaQueryComplianceEnabled) {
assert entityDescriptor.hasSubclasses();
final TableGroup tableGroup = sqlAstCreationState.getFromClauseAccess().getTableGroup(getNavigablePath().getParent());
final ModelPartContainer modelPart = tableGroup.getModelPart();
final EntityMappingType entityMapping;
if (modelPart instanceof EntityValuedModelPart) {
entityMapping = ((EntityValuedModelPart) modelPart).getEntityMappingType();
} else {
entityMapping = (EntityMappingType) ((PluralAttributeMapping) modelPart).getElementDescriptor().getPartMappingType();
}
return new DiscriminatorPathInterpretation(getNavigablePath(), entityMapping, tableGroup, sqlAstCreationState);
}
Aggregations