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 Tegan Clark <te...@yahoo.com> on 2007/05/24 18:52:38 UTC

Caching of resultset metadata

Hi group,
   
  I've got an interesting one:
   
  I have iBATIS 2.3 mapping against a set of legacy Oracle stored procedures (via an out parameter).  These stored procedures return different cursors based on the input parameters supplied, i.e. sometimes it might return three columns, other times six.
   
  The first call works fine, as do calls that return the same cursor structure as the first call.  I get problems though if the cursor structure changes.  I think iBATIS is caching the resultset structure to save it having to interrogate the resultset metadata again for multiple calls.
   
  Unfortunately that doesn't work for me.  Is there any way to turn it off?  If not does anyone have a pointer as to where to start in the code to adjust this behavior?
   
  All help greatly appreciated.
   
  Tegan
   
   
    Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:   
  --- The error occurred in sqlMap/storedProcedure/all_report_pkg/listJobSummary.xml.  
  --- The error occurred while applying a result map.  
  --- Check the listJobSummary-AutoResultMap.  
  --- Check the result mapping for the 'PRODUCT_TYPE_NAME' property.  
  --- Cause: java.sql.SQLException: Invalid column name


       Shape Yahoo! in your own image.  Join our Network Research Panel today!http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 hot CTA = Join our Network Research Panel

Re: Caching of resultset metadata

Posted by Jeff Butler <je...@gmail.com>.
iBATIS does not deal with ResultsetMetaData, but it does try to remember the
structure of previous qureies.  To turn it off, set

   remapResults="true"

Jeff Butler




On 5/24/07, Tegan Clark <te...@yahoo.com> wrote:
>
> Hi group,
>
> I've got an interesting one:
>
> I have iBATIS 2.3 mapping against a set of legacy Oracle stored procedures
> (via an out parameter).  These stored procedures return different cursors
> based on the input parameters supplied, i.e. sometimes it might return
> three columns, other times six.
>
> The first call works fine, as do calls that return the same cursor
> structure as the first call.  I get problems though if the cursor structure
> changes.  I think iBATIS is caching the resultset structure to save it
> having to interrogate the resultset metadata again for multiple calls.
>
> Unfortunately that doesn't work for me.  Is there any way to turn it off?
> If not does anyone have a pointer as to where to start in the code to adjust
> this behavior?
>
> All help greatly appreciated.
>
> Tegan
>
>
>  Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
> --- The error occurred in
> sqlMap/storedProcedure/all_report_pkg/listJobSummary.xml.
> --- The error occurred while applying a result map.
> --- Check the listJobSummary-AutoResultMap.
> --- Check the result mapping for the 'PRODUCT_TYPE_NAME' property.
> --- Cause: java.sql.SQLException: Invalid column name
>
> Shape Yahoo! in your own image. Join our Network Research Panel today!
> http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7hot CTA = Join our Network Research Panel
>