Skip to content

Commit da89662

Browse files
mbelladebeikov
authored andcommitted
HHH-17405 Handle generic mapped superclass path sources
1 parent 2349081 commit da89662

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/MappedSuperclassSqmPathSource.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@
2121
* @author Steve Ebersole
2222
*/
2323
public class MappedSuperclassSqmPathSource<J> extends AbstractSqmPathSource<J> implements SqmJoinable<Object, J> {
24+
private final boolean isGeneric;
25+
2426
public MappedSuperclassSqmPathSource(
2527
String localPathName,
2628
SqmPathSource<J> pathModel,
2729
MappedSuperclassDomainType<J> domainType,
28-
BindableType jpaBindableType) {
30+
BindableType jpaBindableType,
31+
boolean isGeneric) {
2932
super( localPathName, pathModel, domainType, jpaBindableType );
33+
this.isGeneric = isGeneric;
3034
}
3135

3236
@Override
@@ -41,6 +45,11 @@ public SqmPathSource<?> findSubPathSource(String name) {
4145
return sqmPathType.findSubPathSource( name );
4246
}
4347

48+
@Override
49+
public boolean isGeneric() {
50+
return isGeneric;
51+
}
52+
4453
@Override
4554
public SqmPath<J> createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource) {
4655
final NavigablePath navigablePath;

hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmMappingModelHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ public static <J> SqmPathSource<J> resolveSqmPathSource(
145145
name,
146146
pathModel,
147147
(MappedSuperclassDomainType<J>) valueDomainType,
148-
jpaBindableType
148+
jpaBindableType,
149+
isGeneric
149150
);
150151
}
151152

0 commit comments

Comments
 (0)