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 "Rao, Satish" <sa...@fmr.com> on 2005/08/09 16:07:21 UTC

Stored procedures returning resultset

I am using ibatis with oracle and executing a <procedure> within sqlmap
to retrieve a REF CURSOR. Since ibatis does not handle REF CURSOR
directly, I have to use a custom handler and custom java code to map
each column name to a java attribute. In other words, I cannot make use
of the <resultMap> that would map the results directly to a java object.

Is REF CURSOR the only way return a resultset from oracle? 

What other options, if any, are available to return a resultset and have
it mapped directly into a <resultMap> so I don't have to write a custom
mapping code?




Re: Stored procedures returning resultset

Posted by Koka <22...@gmail.com>.
Well, it may be reasonable to avoid ref_cursors at all as it is oracle
specific. So in your procedure you can just insert data you want to
return to some temp table and then just run select.  I have been using
that appoach in the old days when I had to use ADO (thank God that
days have gone :) ) and there seemed no ref_cursor support at all.

Koka