[ http://issues.apache.org/jira/browse/IBATIS-121?page=all ] Sven Boden closed IBATIS-121: -----------------------------
Resolution: Invalid Assign To: Sven Boden Administrative closure. This was already added because of IBATIS-145 a long time ago (looking at the source of SqlExecutor). > support for database object type in IN/OUT parameters to stored procs > --------------------------------------------------------------------- > > Key: IBATIS-121 > URL: http://issues.apache.org/jira/browse/IBATIS-121 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.0.9b, 2.1.0, 2.0.9, 2.0.8 > Reporter: Mark Thomas > Assignee: Sven Boden > Priority: Minor > > Currently, when registering an parameter to be sent/retrieved from a stored > procedure, there is no way to specify the database object type. I am > proposing an extension to BasicParameterMapping to support a "databaseType" > parameter and a change to the method registerOutputParameters in SqlExecutor. > This method is currently as follows: > private void registerOutputParameters(CallableStatement cs, > ParameterMapping[] mappings) throws SQLException { > for (int i = 0; i < mappings.length; i++) { > BasicParameterMapping mapping = ((BasicParameterMapping) mappings[i]); > if (mapping.isOutputAllowed()) { > cs.registerOutParameter(i + 1, mapping.getJdbcType()); > } > } > } > I would like it to look like this: > private void registerOutputParameters(CallableStatement cs, > ParameterMapping[] mappings) throws SQLException { > for (int i = 0; i < mappings.length; i++) { > BasicParameterMapping mapping = ((BasicParameterMapping) mappings[i]); > if (mapping.isOutputAllowed()) { > if(mapping.getDatabaseType() != null) { > cs.registerOutParameter(i + 1, mapping.getJdbcType(), > mapping.getDatabaseType()); > } else { > cs.registerOutParameter(i + 1, mapping.getJdbcType()); > } > } > } > } > With these changes, iBATIS can handle returning Arrays, Structs, and even > Java objects from databases (specifically Oracle) using TypeHandlers. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira