[ http://issues.apache.org/jira/browse/IBATIS-145?page=all ]
     
Brandon Goodin closed IBATIS-145:
---------------------------------

    Resolution: Fixed

The original reported issue was fixed some time ago and not closed. If there 
are other related issues then another bug report should be opened.

> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to