HHH-18007 Use correct expressible when checking query result type
This commit is contained in:
parent
e036509487
commit
758a660bca
|
@ -317,7 +317,7 @@ public abstract class AbstractSelectionQuery<R>
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !sessionFactory.getSessionFactoryOptions().getJpaCompliance().isJpaQueryComplianceEnabled() ) {
|
if ( !sessionFactory.getSessionFactoryOptions().getJpaCompliance().isJpaQueryComplianceEnabled() ) {
|
||||||
verifyResultType( expectedResultClass, sqmSelection.getNodeType() );
|
verifyResultType( expectedResultClass, sqmSelection.getExpressible() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else, let's assume we can instantiate it!
|
// else, let's assume we can instantiate it!
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class SqmBasicValuedSimplePath<T>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JavaType<T> getExpressibleJavaType() {
|
public JavaType<T> getExpressibleJavaType() {
|
||||||
return getJavaTypeDescriptor();
|
return super.getExpressible().getExpressibleJavaType();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class SqmEmbeddedValuedSimplePath<T>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JavaType<T> getExpressibleJavaType() {
|
public JavaType<T> getExpressibleJavaType() {
|
||||||
return getJavaTypeDescriptor();
|
return super.getExpressible().getExpressibleJavaType();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -30,4 +30,9 @@ public interface SqmAliasedNode<T> extends SqmTypedNode<T> {
|
||||||
default SqmExpressible<T> getNodeType() {
|
default SqmExpressible<T> getNodeType() {
|
||||||
return getSelectableNode().getNodeType();
|
return getSelectableNode().getNodeType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
default SqmExpressible<T> getExpressible() {
|
||||||
|
return getSelectableNode().getExpressible();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue