You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Kevin Wood <ke...@gmail.com> on 2007/01/31 15:23:04 UTC
array of oracle types as out param
Hi,
My organisation has an Oracle DB that has procedures with out parameters
like this:
PROCEDURE get_all_rec(code IN VARCHAR2,
all OUT ALL_RECTYPE
msg OUT VARCHAR2
)
CREATE OR REPLACE TYPE ALL_RECTYPE
AS TABLE OF RECTYPE
CREATE OR REPLACE TYPE RECTYPE
AS OBJECT
(
my_var VARCHAR2 (10),
my_n_1 NUMBER,
my_n_2 NUMBER,
)
I couldn't figure out how to write sqlMaps for the OUT parameter for a
custom oracle type.
<parameterMap id="get_all_rec_PM" class="map">
<parameter property="code" mode="IN" jdbcType="VARCHAR"
javaType="string" />
<parameter property="all" mode="OUT" jdbcType="java.sql.Array" ?????
<parameter property="msg" mode="OUT" jdbcType="VARCHAR"
javaType="string" nullValue="x"/>
</parameterMap>
<procedure id="get_all_rec" parameterMap="get_all_rec_PM">
{ call get_all_rec(?,?,?) }
</procedure>
PS: I have found these pages for the same problem
http://issues.apache.org/jira/browse/IBATIS-243
http://issues.apache.org/jira/browse/IBATIS-145
http://issues.apache.org/jira/browse/IBATIS-283
Thanks for your help. I love iBATIS.