ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Zabel <...@ezabel.com>
Subject Re: Really Weird Oracle REF Cursor Behavior
Date Wed, 13 Aug 2008 02:36:15 GMT
Very interesting. How do you map something like that?


On Aug 12, 2008, at 5:57 PM, Jeff Stahl wrote:

> iBATIS seems to have a problem with handling RefCursors as OUT  
> parameters in stored procedures.  I don't know how you're attempting  
> to use iBATIS in your project, but in house here we've found that  
> stored functions (where the Cursor is returned from the function and  
> not fetched into an out parameter) works best.
> Hope This Helps,
> Jeff Stahl
> Ian Zabel wrote:
>> Hello,
>> Using the latest build of iBATIS and Oracle REF Cursors, we're  
>> running
>> into a problem with certain rows not coming back in the ResultSet. It
>> seems to be certain data in the rows that makes them not return.
>> For example, we have a column called INTERNAL_INVOICE_NBR. With the
>> following values in that column, ROW 1 does _not_ return in the
>> ResultSet from the REF Cursor when using iBATIS.
>> ROW 1: mts - Sample Invoice, b2325
>> ROW 2: mts - New Invoice, b2330
>> However, if we update the column in ROW 1 with the value from ROW 2,
>> then the row returns fine.
>> Also, when using straight JDBC, the rows are returned.
>> I've tried disabling cacheModels, enhancement, and lazyLoading, to no
>> avail. When debugging into the iBATIS
>> SqlExecutor.retrieveOutputParameters method, the ResultSet that it
>> gets on line 399 does not include the row. In fact, if this row is  
>> the
>> only row returned by the query, the ResultSet has no results at all.
>> Any ideas? I'm really confused because it works fine with JDBC using
>> the same connection as iBATIS, and if we change the data somewhat,
>> then it returns fine.
>> Thanks,
>> Ian.

View raw message