Checking property existence of include fragment

14 views
Skip to first unread message

Raúl Sánchez

unread,
May 21, 2020, 4:59:37 AM5/21/20
to mybatis-user
Hi all,
Is there some way to check if a property in include fragment has been set?
Example:

<include refid="myFilterLocation">
     
<property name="model" value="model_name"/>
...
...
...
</include>

And then when this fragment is used:

<if test="....">
AND ${model}= #{${param}.model,jdbcType=VARCHAR}
</if>

Is there some way to test if the property is not sent. I want not send properties if I do not want to filter in my query.

Kind regards.




Reply all
Reply to author
Forward
0 new messages