ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Okan Çetin" <okance...@gmail.com>
Subject "queryForList" problem
Date Wed, 13 Sep 2006 20:22:16 GMT
Hi all;

I want to get some data from database that using ibatis

The code:

Integer user_id=usr.getuser_id();
List list=sqlMapper.queryForList("getEventidFromAttendance",user_id);

And the xml file is:

..
<select id="getEventidFromAttendance" parameterClass="int" resultClass="
java.util.List">
    select event_id from PUBLIC.attendance
    where user_id = #user_id#
 </select>
..

The problem:
String sample=list.get(0).toString();
sample contains : []
but its value must be a integer, like 5,10...
But the value of list.size(), is correct.

Where is my fault?

Thanks.
Okan.
-- 
~
otomatik oluşturuldu:
http://ocetin.net/log
http://linux.beykent.edu.tr
Mime
View raw message