HHH-17847: fix the issue in result set mapping when stored procedure has INOUT param

This commit is contained in:
Nguyen Nhu Phuc 2024-03-14 19:46:57 +08:00 committed by Christian Beikov
parent bd4c9b4c9b
commit d888f1984c
1 changed files with 0 additions and 16 deletions

View File

@ -170,22 +170,6 @@ public class OutputsImpl implements Outputs {
final ProcedureCallImpl<?> procedureCall = (ProcedureCallImpl<?>) context; final ProcedureCallImpl<?> procedureCall = (ProcedureCallImpl<?>) context;
final ResultSetMapping resultSetMapping = procedureCall.getResultSetMapping(); final ResultSetMapping resultSetMapping = procedureCall.getResultSetMapping();
final JavaTypeRegistry javaTypeRegistry = context.getSession()
.getTypeConfiguration()
.getJavaTypeRegistry();
procedureCall.getParameterBindings().visitBindings( (parameterImplementor, queryParameterBinding) -> {
final ProcedureParameter<?> parameter = (ProcedureParameter<?>) parameterImplementor;
if ( parameter.getMode() == ParameterMode.INOUT ) {
final JavaType<?> basicType = javaTypeRegistry.getDescriptor( parameterImplementor.getParameterType() );
if ( basicType != null ) {
resultSetMapping.addResultBuilder( new ScalarDomainResultBuilder<>( basicType ) );
}
else {
throw new UnsupportedOperationException();
}
}
} );
final ExecutionContext executionContext = new OutputsExecutionContext( context.getSession() ); final ExecutionContext executionContext = new OutputsExecutionContext( context.getSession() );
final JdbcValues jdbcValues = new JdbcValuesResultSetImpl( final JdbcValues jdbcValues = new JdbcValuesResultSetImpl(