ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ppz4j (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-145) oracle's user-defined objects are not supported as store procedure out parameters
Date Tue, 14 Jun 2005 20:12:53 GMT
    [ http://issues.apache.org/jira/browse/IBATIS-145?page=comments#action_12313638 ] 

ppz4j commented on IBATIS-145:

very well, compliments for the timeliness. My tests gave successfull returns. Unfortunatally
while i was testign i have found another bug that i have report in item IBATIS-153. 
best regards

> oracle's user-defined objects are not supported as store procedure out parameters
> ---------------------------------------------------------------------------------
>          Key: IBATIS-145
>          URL: http://issues.apache.org/jira/browse/IBATIS-145
>      Project: iBatis for Java
>         Type: Improvement
>   Components: SQL Maps
>     Versions: 2.1.0
>  Environment: oracle and maybe any others db that support user defined data types  
>     Reporter: ppz4j
>     Assignee: Brandon Goodin

> we have to call legacy oracle store procedure with named array types as output parameters.
When I try it I get an invalid parameter type exception
> This problem arises because to use these params the SQLExecutor class should call the
?callableStatement.registerOutputParameters?  method version with the typeName param. In fact
the java doc of this method suggests "This version of the method registerOutParameter  should
be used for a user-defined or REF output parameter" and "To be portable, however, applications
should always provide these values for user-defined and REF parameters. Although it is intended
for user-defined and REF parameters, this method may be used to register a parameter of any
JDBC type. If the parameter does not have a user-defined or REF type, the typeName parameter
is ignored "  
> To handle this problem I have made some changes in source code and dtd file, but I hope
that in a next version this problem will be resolved.   
> Following the changes that I have made to add this enhancement:
> Added property typeName to bean BasicParameterMapping, with set and get methods. 
> Added code that load typeName param from xml in SqlMapParser and code that save it as
property of the current instance of mapping.  
> Changed the SQLExecutor, now before call the CallableStatement.registerOutputParameter
the registerOutputParameters method checks if the typeName of the given map parameter is not
null. If it so it calls the  overloaded method registerOutParameter(int paramIndex,int sqlType,String
typeName) instead of registerOutParameter(int paramIndex,int sqlType.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message