开发者社区> 问答> 正文

如何使用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 2924 0
1 条回答
写回答
取消 提交回答
  • 我说我不帅他们就打我,还说我虚伪

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

    2019-07-17 19:06:51
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载