ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashid Jilani" <jil...@lifebiosystems.com>
Subject returning an array List
Date Fri, 20 Feb 2009 17:56:26 GMT
Hil: Gurus I am bit puzzle with the behavior of Ibatis when I try to return
a List.

 

Here is my sqlMap file 

 

<select id="getTradeList"  resultClass="java.util.List"

                

        SELECT SIDE FROM trade

    </select>

 

Here is the java code to return the list

 

return (List)sqlMap.queryForList("getTradeList");

 

When I iterate the result of list I don't find the result value but the
empty list, e.g lets say I have 3 results in my resultSet the code below
returns 

 

[]

[]

[]

 

for (Object listElement : list) {

            System.out.println(listElement.toString());

            }

 

Can some one explain this behavior, am I missing some thing.

 

Thanks,

RJ.

 


Mime
View raw message