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: check if one of two fields are null
Date Fri, 15 Jul 2005 15:48:09 GMT
I'd do it in Java, before the mapped statement is called.

Larry


On 7/15/05, Nathan Maves <Nathan.Maves@sun.com> wrote:
> I need to have a dynamic query that appends a where clause if one of
> two fields are null.
> 
> I could only come up with
> 
> <isNull property="field1">
>          DO THIS
> </isNull>
> 
> <isNull property="field2">
>          DO THIS
> </isNull>
> 
> This is obviously wrong since the code could be appended twice.
> 
> I need to combine these two statement so that DO THIS is only
> executed if one of the fields (field1,field2) are null.
> 
> Nathan
>

Mime
View raw message