ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arun m <arun_m...@yahoo.com>
Subject problem with Ibatis returning correct number of rows
Date Wed, 13 Jul 2005 19:23:50 GMT
Hello there
                 we are implementing ibatis. In one scenario, the code is getting only one
row from the oracle database. I looked at the sql statement generated by Ibatis. The sql statement
gets 2 rows from the database where as Ibatis gets only one.
Allow me to give the peice of code diong this.
1. the map
<resultMap id="getDetails" class="XXXXBean">
   <result property="Id" column="id" />      
   <result property="Amount" column="amount" />      

  <statement id="getDetailsbyId" resultMap="getDetails">
    table       where id = #Id#   
The java code used to call this is as follows
ArrayList invoiceviews = (ArrayList) getSqlMapClientTemplate().queryForList("getDetailsbyId",
I did not want to be too verbose in the email hence I shortened the code. I can share the
entire code, if anybody is interested. But the size of arraylist returned in the above code
is 1. The log4j log shows that Ibatis generates only one resultset for the query. But if I
execute the same query generated by Ibatis I get 2 rows in oracle db.
Has anyone encountered this problem before ?

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
View raw message