ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nilesh Bhattad" <nil...@outlinesys.com>
Subject Generic SQL Map - sorry if this is a repost !
Date Wed, 24 Nov 2004 15:50:13 GMT
I created a generic SQL Map like below. I get a SQL stmt from somewhere and trying to use iBatis
SQLMap just to execute the SQL. I'll provide the complete select stmt.
<select id="custom_sqlstmt" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">



First call goes thro and comes back with proper results. But when I try to execute a different
SQL using this same SQL Map, it gives me some mapping exceptions. Looking at the exception,
all I can think of is that, sql map internally keeps the resultset metadata's structure somewhere
in the cache and use the same information again for the subsequent sql calls. In above case,
since I provide a different SQL stmt each time, resultset metadata would be different per
call. And as a result, when sqlmap tries to map the result using old structure, it throws
mapping exceptions.

Is there any work around to resolve this issue? Thanks in advance for your help!

- Nilesh -

View raw message