As this post states
<if test="sortBy == 'col1' ">
...
</if>
does only compare String by case. Is there a way like equalsIgnoreCase in MyBatis XML Mapper?
Inelegantly one could
<if test="sortBy == 'col1' or sortBy == 'COL1' ">
...
</if>
As this post states
<if test="sortBy == 'col1' ">
...
</if>
does only compare String by case. Is there a way like equalsIgnoreCase in MyBatis XML Mapper?
Inelegantly one could
<if test="sortBy == 'col1' or sortBy == 'COL1' ">
...
</if>
Java code will work, just change the test attribute double quotes by simple quotes, or escape them:
<if test='"col1".equalsIgnoreCase(sortBy)'>
...
</if>