ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: "queryForList" problem
Date Wed, 13 Sep 2006 20:29:23 GMT
Make it resultClass="java.lang.String" or resultClass="string" instead.

Larry


On 9/13/06, Okan Çetin <okancetin@gmail.com> wrote:
> 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