Will isEmpty work in your case?

Larry


On Nov 30, 2007 10:34 AM, Chris McMahon <[EMAIL PROTECTED]> wrote:
>
> I'd like to have a where clause that can be dynamically built with "name is
> null", "name = #name#", or nothing at all.
>
> <select id="selectFiles" parameterClass="map">
>     select * from files
>     <dynamic prepend="where">
>         where
>         <isPropertyAvailable property="name">
>             <isNull property="name">
>                name is null
>             </isNull>
>             <isNotNull property="name">
>                name = #name#
>             </isNotNull>
>         </isPropertyAvailable>
>     </dynamic>
> </select>
>
> What I have here doesn't seem to work.  If the name is set to null, it
> always fails the <isPropertyAvailable> condition.
>
> How are determining and setting nulls usually handled with iBATIS?
>
> Thanks.
>
>
> ________________________________
> You keep typing, we keep giving. Download Messenger and join the i'm
> Initiative now. Join in!

Reply via email to