SQL parameter

Parameters are very powerful elements in MyBatis. It's powerful but it's sometimes hard to understand what's going on if something goes wrong. A major improvement in v3.x is that the plugin tries its best to help you to eliminate

Parameter 'xx' not found. Available parameters are [zz, yy]

We did this by providing you auto-completion based on parameter internal rule and statement's mapper context. It's available in both XML statement and annotation statement and works very well with Parameter Language.


The plugin provides you context-aware auto-completion which means it'll show you properties that are only available in current context. Any property that can't be resolved due to current context will be marked as an error, so you can correct it while you're editing it.

Unresolvable property will not be marked as an error if any map parameter is present on mapper method, you'd better not to use a map as a parameter on a mapper method because it's not type safe.


The following elements will be used to compute property for auto-completion:

  • Field with any modifier (corresponding getter method is not mandatory)
  • Getter method that starts with 'get'
  • Getter method that starts with 'is'



Codes Magic © 2013-2018 · Terms