Reputation:
MyBatis 3.2.8. I have the following code in select:
<bind name="groupDir" value="references.get('groupDir')" />
<if test="groupDir!=null">
LEFT OUTER JOIN ......
</if>
Everything is ok when groupDir!=null
. However, when groupDir==null
I get the following exception:
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.apache.ibatis.binding.BindingException: Parameter 'groupDir' not found. Available parameters are [filterRules, sorterRules, param5, references, columns, param3, param4, param1, param2, limitRule]
### Cause: org.apache.ibatis.binding.BindingException: Parameter 'groupDir' not found. Available parameters are [filterRules, sorterRules, param5, references, columns, param3, param4, param1, param2, limitRule]
How to solve this problem?
Upvotes: 2
Views: 1398
Reputation:
It was a bug and now it's fixed. https://github.com/mybatis/mybatis-3/issues/343
Upvotes: 0