ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris McMahon <cochran...@hotmail.com>
Subject Determining Nulls with parameterClass="map"
Date Fri, 30 Nov 2007 17:34:59 GMT
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">
        <isPropertyAvailable property="name">
            <isNull property="name">
               name is null
            <isNotNull property="name">
                name = #name#

What I have here doesn't seem to work.  If the name is set to null, it always fails the <isPropertyAvailable>

How are determining and setting nulls usually handled with iBATIS?  


You keep typing, we keep giving. Download Messenger and join the i’m Initiative now.
View raw message