1

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>
Community
  • 1
  • 1
Mahatma_Fatal_Error
  • 720
  • 1
  • 10
  • 26

1 Answers1

0

Java code will work, just change the test attribute double quotes by simple quotes, or escape them:

<if test='"col1".equalsIgnoreCase(sortBy)'> 
 ...
</if>
blackwizard
  • 2,034
  • 1
  • 9
  • 21