Can we have a stored function call that returns a ref cursor and have that map to a resultMap?
If yes, what is the syntax to call a stored function from sqlmap? -----Original Message----- From: Sven Boden [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 09, 2005 11:51 AM To: user-java@ibatis.apache.org Subject: Re: Stored procedures returning resultset 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:[EMAIL PROTECTED] >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>