HHH-18302 DB2CallableStatementSupport uses an invalid syntax for named parameters

This commit is contained in:
Andrea Boriero 2024-07-05 15:17:45 +02:00 committed by Steve Ebersole
parent a3c779a019
commit 8740a832d2
2 changed files with 6 additions and 1 deletions

View File

@ -857,6 +857,11 @@ public class DB2Dialect extends Dialect {
return false;
}
@Override
public boolean supportsNamedParameters(DatabaseMetaData databaseMetaData) throws SQLException {
return false;
}
@Override
public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException {
statement.registerOutParameter( col++, Types.REF_CURSOR );

View File

@ -85,7 +85,7 @@ public class DB2CallableStatementSupport extends AbstractStandardCallableStateme
procedureCall
);
if ( parameter.getName() != null ) {
buffer.append( ':' ).append( parameter.getName() );
buffer.append( parameter.getName() ).append( " => ?" );
}
else {
buffer.append( "?" );