HHH-18007 Use correct expressible when checking query result type

This commit is contained in:
Marco Belladelli 2024-05-02 09:52:43 +02:00 committed by Christian Beikov
parent 433fbe9185
commit 1919409ffc
4 changed files with 8 additions and 3 deletions

View File

@ -315,7 +315,7 @@ public abstract class AbstractSelectionQuery<R>
}
if ( !sessionFactory.getSessionFactoryOptions().getJpaCompliance().isJpaQueryComplianceEnabled() ) {
verifyResultType( expectedResultClass, sqmSelection.getNodeType() );
verifyResultType( expectedResultClass, sqmSelection.getExpressible() );
}
}
// else, let's assume we can instantiate it!

View File

@ -122,7 +122,7 @@ public class SqmBasicValuedSimplePath<T>
@Override
public JavaType<T> getExpressibleJavaType() {
return getJavaTypeDescriptor();
return super.getExpressible().getExpressibleJavaType();
}
@Override

View File

@ -109,7 +109,7 @@ public class SqmEmbeddedValuedSimplePath<T>
@Override
public JavaType<T> getExpressibleJavaType() {
return getJavaTypeDescriptor();
return super.getExpressible().getExpressibleJavaType();
}
@Override

View File

@ -30,4 +30,9 @@ public interface SqmAliasedNode<T> extends SqmTypedNode<T> {
default SqmExpressible<T> getNodeType() {
return getSelectableNode().getNodeType();
}
@Override
default SqmExpressible<T> getExpressible() {
return getSelectableNode().getExpressible();
}
}