<if test="_parameter != null">
</if>
I'm not sure this ever made it into the docs.
Jeff Butler
On Tue, Jun 21, 2011 at 4:01 PM, AndyK <
[hidden email]> wrote:
> I'm porting some ibatis extension code to mybatis. In that code we
> generate an isParameterPresent block. What is the equivalent in
> mybatis?
>
> For example,
>
> <select id="specialSelect" parameterType="ComplexObject"
> resultType="AnotherObject" >
> <include refid="anotherSelect" />
> from A_TABLE
> <isParameterPresent >
> <isNotNull property="aProperty" >
> order by #{aProperty}
> </isNotNull>
> </isParameterPresent>
> </select>
>
> How would I convert that to <if test="X != null"> ? I don't know what
> the value of X should be - i.e. how do I refer to ComplexObject itself
> and not a property of ComplexObject?