ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samek Jiri - AZ Direct" <jiri.sa...@allianzdirect.cz>
Subject Oracle objects mapping in iBatis 3
Date Fri, 05 Feb 2010 14:27:42 GMT
Hallo,
 
I have a stored procedure in DB (running on Oracle) with one parameter -
an Oracle object:
 
create or replace type TEST1STRING as object(
  str VARCHAR(50)
)
 
create or replace
procedure test1(str IN OUT TEST1STRING)
IS
BEGIN
  str.str := 'justsometext';  
END;

I am trying to call this procedure via iBatis 3. 
 
The following code is for the simplified case when parameter of stored
Procedure is just a VARCHAR. The code is working. 
But I am unable to modify it so it would be using the Oracle type and a
specific java type.
 
<mapper>
 ...
 <select id="test1" statementType="CALLABLE" >
     {call test1(#{str,mode=INOUT,jdbcType=VARCHAR})}
 </select>
 ...
<mapper>

<configuration>
 ...
 <typeHandlers>
  <typeHandler javaType="String" jdbcType="VARCHAR"
handler="MyTypeHandler"></typeHandler>
 </typeHandlers>
 ...
</configuration>
 
Any help would be much appreciated.
 
Jiri Samek
 

Mime
View raw message