Checking property existence of include fragment

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Checking property existence of include fragment

Raúl Sánchez
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.




--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/ffe764ca-9b6a-45e1-a2b7-b1c90e76fc71%40googlegroups.com.