ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Lists of objects that has a list as a property
Date Fri, 17 Jun 2005 11:42:52 GMT
Are you saying that it fails if searchValue is a list?

On 6/14/05, Justiniano, Miguel <JustinianoM@pragmatics.com> wrote:
> I am currently trying to implement a sql map that will execute a query with
> a variable list of search filters like so:
> 
> <select id="getItems" parameterClass="queryDto"
> resultClass="java.lang.String">
>         select name
>         from itemTable
>         where id = #id#
>         <iterate property="filterList" prepend="and" conjunction=" and ">
>                 $filterList[].columnName$ $filterList[].comparator$
> #filterList[].searchValue#
>         </iterate>
> </select>
> 
> The "searchValue" property on the object in the filterList is a
> java.lang.Object so we can use either a regular string, a date, or a list as
> the value.  Now, there's no problem when a filter uses a date or a string,
> but if any filter uses a list ibatis tells me there's a NullPointerException
> being thrown when i try to execute the query.
> 
> Is this a bug, and is there another get what I want working?
> 
> - miguel
> 
> 
> ____________________________
> http://www.pragmatics.com
>

Mime
View raw message