Dears,
i am trying to migrate to Spring 3 and hibernate 6 and i am using StoredProcedureQuery with named parameters, it was working fine in Hibernate 5, but when i migrated to Hibernate 6 it fails with this error Error calling CallableStatement.getMoreResults [ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to ‘GET_NEXT_MESSAGES’
it’s failing in Oracle and Mssql Db, when i change the order of the registerStoredProcedureParameter methods to match the procedure order, it works fine, is the param name is not being considered any more???
is there any way to make it work same as the old behavior without changing the order of the registered params as i am passing the param name??
StoredProcedureQuery storedProcedureQuery = entityManager.createStoredProcedureQuery("procedure_name", Entity.class);
storedProcedureQuery.registerStoredProcedureParameter(STATUS, String.class, IN);
storedProcedureQuery.registerStoredProcedureParameter(PMAXRETRY, Integer.class, IN);
storedProcedureQuery.registerStoredProcedureParameter(CUR_OUT, Void.class, REF_CURSOR);
storedProcedureQuery.setParameter(STATUS, "PENDING");
storedProcedureQuery.setParameter(PMAXRETRY, 10);