I am porting some old iBatis version 2.? code and am wondering how to replace the <isParameterPresent>
tag? I have read the MyBatis user guide, and know you can do a <if test="">
but I do not know how to refer to the the parameter object? Does it have a special name? Is there a different tag to use?
It turns out that there is a special variable called "_parameter". It does not appear in the user guide, but it should be there according to Jeff Butler. You can then test this variable for null.
Thus it seems the replacement for <isParameterPresent>
is <if test="_parameter != null">
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With