<isNotEmpty prepend="and" propery="area>
You mispelled *property*
Other than that, what is NOT working? are you getting an error? Is the
result wrong? What is it you want to accomplish?
Brandon
On 1/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I want to run one dynamic query like this:
>
> select * from cto.personinfovo where id=#id# and area=#area#
>
> But for "area" field, is has two conditions, one is for "ALL" and one is the
> input value, the ibatis XML file is like this and it's not working well,
>
> <select id="selectALL" parameterClass="PersoninfoPO"
> resultClass="PersoninfoPO">
> <![CDATA[ select * from cto.personinfovo ]]>
> <dynamic prepend="where">
> <isNotEmpty prepend="and" property="id">
> <![CDATA[ (id=#id#) ]]>
> </isNotEmpty>
> <isNotEmpty prepend="and" propery="area>
> ( <![CDATA[ (area=#area#) ]]>
> <isEqual prepend="or" property="area" compareValue="ALL">
> <![CDATA[(area in
> ('SC','EC','CC','NC','NE','SW','NW'))]]>
> </isEqual> )
> </isNotEmpty>
> </dynamic>
> </select>
>
> Could any one give me the help?
>
> Thanks so much!
>
>
>