ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Boden <list...@pandora.be>
Subject Re: Stored procedures returning resultset
Date Tue, 09 Aug 2005 15:50:49 GMT

For the moment there's no direct way to create a ResultMap from a
procedure call (the closest you get is returning a ref cursor and
using custom type handlers).

There is already a request in JIRA to support this:
http://issues.apache.org/jira/browse/IBATIS-154
Maybe you can vote for it there or add your support comments ;-)

Regards,
Sven

On Tue, 9 Aug 2005 10:57:34 -0400, you wrote:

>The issue is, we have to use <procedure> calls as a company policy and
>not make <select> calls and hence I wanted to create the resultMap from
>the procedure call.
>
>-----Original Message-----
>From: Koka [mailto:226057@gmail.com] 
>Sent: Tuesday, August 09, 2005 10:55 AM
>To: user-java@ibatis.apache.org
>Subject: Re: Stored procedures returning resultset
>
>
>No. You'll need to run extra select statement after executing the
>procedure to retrieve data from temporary table:
>
>Say your proc creates
>
>CREATE GLOBAL TEMPORARY TABLE temp_emp_table (
>  EMP_ID NUMBER,
>  FNAME VARCHAR2(30),
>  LNAME VARCHAR2(30),
>) ON COMMIT DELETE ROWS;
>
>Then you need
>
><statement id='getEmps' resultMAp='proc-result'>
>       select * from temp_emp_table
></statement>


Mime
View raw message