开发者社区 问答 正文

如何使用ibatis 过滤二维List条件?

参数: List“> countryCodesList ”
[[US,ZH,XX],[ALL]]
ibatis 中:
authCountryCodes like '%|' || #countryCodesList[][]# || '|%'
如下是生成的脚本:

(
(
authCountryCodes like '%|' || ? || '|%'
and
authCountryCodes like '%|' || ? || '|%'
and
authCountryCodes like '%|' || ? || '|%'
)
or
(
authCountryCodes like '%|' || ? || '|%'
)
)
[2015-08-27 15:27:42.691 ,WARN ,Portal,504016000001508271527390043001,http-bio-11100-exec-11,null]:Content=Exception, cause is:
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the ProjectPackageContentext.queryCount-InlineParameterMap.
--- Check the parameter mapping for the 'countryCodesList[0][0]' property.
--- Cause: java.lang.NullPointerException

展开
收起
蛮大人123 2016-03-18 15:28:47 3025 分享 版权
1 条回答
写回答
取消 提交回答
  • 我说我不帅他们就打我,还说我虚伪

    ibatisauthCountryCodes like '%|' || #countryCodesList[][]# || '|%'

    2019-07-17 19:06:51
    赞同 展开评论
问答地址: