具有绑定 null 的 MyBatis 变量不起作用
MyBatis variable with binded null is not working
MyBatis 3.2.8。我在 select 中有以下代码:
<bind name="groupDir" value="references.get('groupDir')" />
<if test="groupDir!=null">
LEFT OUTER JOIN ......
</if>
groupDir!=null
时一切正常。但是,当 groupDir==null
我得到以下异常:
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]
如何解决这个问题?
这是一个错误,现在已修复。 https://github.com/mybatis/mybatis-3/issues/343
MyBatis 3.2.8。我在 select 中有以下代码:
<bind name="groupDir" value="references.get('groupDir')" />
<if test="groupDir!=null">
LEFT OUTER JOIN ......
</if>
groupDir!=null
时一切正常。但是,当 groupDir==null
我得到以下异常:
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]
如何解决这个问题?
这是一个错误,现在已修复。 https://github.com/mybatis/mybatis-3/issues/343