HHH-17405 Handle generic mapped superclass path sources

This commit is contained in:
Marco Belladelli 2023-11-17 12:21:27 +01:00 committed by Christian Beikov
parent e609be66f3
commit a69553e8bf
2 changed files with 12 additions and 2 deletions

View File

@ -20,12 +20,16 @@ import org.hibernate.query.sqm.tree.from.SqmFrom;
* @author Steve Ebersole
*/
public class MappedSuperclassSqmPathSource<J> extends AbstractSqmPathSource<J> implements SqmJoinable<Object, J> {
private final boolean isGeneric;
public MappedSuperclassSqmPathSource(
String localPathName,
SqmPathSource<J> pathModel,
MappedSuperclassDomainType<J> domainType,
BindableType jpaBindableType) {
BindableType jpaBindableType,
boolean isGeneric) {
super( localPathName, pathModel, domainType, jpaBindableType );
this.isGeneric = isGeneric;
}
@Override
@ -39,6 +43,11 @@ public class MappedSuperclassSqmPathSource<J> extends AbstractSqmPathSource<J> i
return sqmPathType.findSubPathSource( name );
}
@Override
public boolean isGeneric() {
return isGeneric;
}
@Override
public SqmPath<J> createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource) {
return new SqmEntityValuedSimplePath<>(

View File

@ -147,7 +147,8 @@ public class SqmMappingModelHelper {
name,
pathModel,
(MappedSuperclassDomainType<J>) valueDomainType,
jpaBindableType
jpaBindableType,
isGeneric
);
}