ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim <deadmo...@gmail.com>
Subject Fwd: ORA-06572: Function has OUT parameters
Date Thu, 11 Sep 2008 13:09:47 GMT
Hello,

I've been thinking how to do this for too long now. Ibatis version is
2.1.0.565, Oracle version is 9. What I'm trying to do is map a statement to
a Java class and get one varchar OUT parameter. PL/SQL function is like

function with_out (
    in_param     in varchar2,
    out_message    out varchar2
) return some_type;

TYPE some_type
 AS TABLE OF some_object

TYPE SOME_OBJECT as object (
    id            number(9),
    class  varchar2(16)
);

class SomeClass{
[id, class] setters, getters (as usual)
}

<select id="someSelect"
       resultClass="SomeClass">

        SELECT  id, class
        FROM TABLE(with_out (#in:VARCHAR#,#out:VARCHAR#) )
</select>

IbatisDatastore.getSqlMapInstance().queryForList("someSelect", paramMap);

That's what I have now and what gives me a 'Function has an OUT parameter'
error. One solution I see is changing function to procedure and adding one
more out parameter. Unfortunately, I'm not familiar with Ibatis enough to be
able to map 'some_type' OUT parameter to 'SomeClass'.
Would be grateful for any advice you can give!

Mime
View raw message