Mybatis 传入List类型参数,报错:There is no getter for property named '__frch_item_0' in
错误如下:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '__frch_item_0' in 'class com.asiacloud.core.model.PageModel'
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:368)
at $Proxy6.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
at com.asiacloud.core.base.dao.impl.BaseDaoImpl.select(BaseDaoImpl.java:74)
at com.asiacloud.syse.unitaccount.dao.impl.TSyseMaintainAccountDaoImpl.queryListByUnitIdPage(TSyseMaintainAccountDaoImpl.java:107)
Mapper
<select id="queryListByUnitIdPage" parameterType="TSyseMaintainAccount" resultMap="TSyseMaintainAccountResultMap">
select a.*,b.UNIT_NAME linkUnitName from T_SYSE_MAINTAIN_ACCOUNT a
left JOIN T_SYSE_OPER_UNIT b
on a.UNIT_ID=b.ID
where a.STATUS_FLAG in ('1','2')
AND a.UNIT_ID in
<foreach item="item" index="index" collection="params.idList" open="(" separator="," close=")">
#{item}
</foreach>
AND a.ID != #{params.id}
</select>
上面写法错误,注意下面foreach中的值取法,如果取的是List,要用索引来取。
<foreach item="item" index="index" collection="params.idList" open="(" separator="," close=")">
#{params.idList[${index}]}
</foreach>
Mybatis 传入List类型参数,报错:There is no getter for property named '__frch_item_0' in的更多相关文章
- Mybatis报错: There is no getter for property named xxx
在mapper文件中函数的形参上加上注解. 例如: 出现了如下错误:核心错误提示就是There is no getter for property named xxx ### Error qu ...
- MyBatis if test 传入一个数字进行比较报错 There is no getter for property named 'userState' in 'class java.lang.Integer'
在写MyBatis映射文件中,我要传入一个 int 类型的参数,在映射文件中用 'test' 中进行比较,我花了很长时间百度,发现都是不靠谱的方法,有把数字在比较时转成字符串用 equals 比较的. ...
- Mybatis 报错 There is no getter for property named '***' in 'class java.lang.String'
在mapper.xml中 , 如果单参数是String类型 , 且在sql语句中对参数进行了判断 , 如下 when 中的判断 , 如果出现 if 判断也是一样的.都需要把判断中的参数用 _param ...
- mybatis报错,There is no getter for property named 'templateName' in 'class
There is no getter for property named 'templateName' in 'class 主要原因是因为mapper.xml 的语句有错误,导致在bean里找不到相 ...
- 当传入数据只有一个时mybatis中<if>判断会出现There is no getter for property named 'subjectId' in 'class java.lang.Intege
用"_parameter"代替当前参数 正确: <select id="selectSubjectByPId" parameterType="j ...
- MyBatis查询传一个参数时报错:There is no getter for property named 'sleevetype' in 'class java.lang.Integer
用MyBatis进行查询,传入参数只有一个时(非Map)如int,报错 There is no getter for property named 'sleevetype' in 'class jav ...
- 【Mybatis】mybatis查询报错org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'areaName' in 'class java.lang.String'
mybatis查询报错: Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for pro ...
- Python模块学习之xlrd 读取Excel时传入formatting_info=True报错:NotImplementedError: formatting_info=True not yet implemented
问题:xlrd读取Excel时传入 formatting_info=True 报错 之前我们使用读取xls文件的时候都是使用的xlrd库,但是这个库只能操作 .xls格式,对于后来的 .xlsx的版本 ...
- Mybatis查询报错:There is no getter for property named '*' in 'class java.lang.String
问题: 执行查询时报错:There is no getter for property named '*' in 'class java.lang.String 原因: 传过去的参数为识别.本例为 p ...
随机推荐
- day5模块学习--shelve模块
shelve模块 shelve类似于一个key-value数据库,可以很方便的用来保存Python的内存对象,其内部使用pickle来序列化数据,简单来说,使用者可以将一个列表.字典.或者用户自定义的 ...
- php 根据ip获取城市以及网络运营商名称(利用qqwry.dat)
根据用户IP地址判定出所在城市以及网络运营商 qqwry.dat下载地址:http://files.cnblogs.com/guangxiaoluo/qqwry.rar 解压出来即可 //获取用户真 ...
- 【LOJ】#2292. 「THUSC 2016」成绩单
题解 神仙dp啊><(也有可能是我菜) 我们发现,想要拿一段区间的话,只和这个区间的最大值和最小值有关系,那么我们考虑,如果一个区间[l,r]我们拿走了一些数后,使它的最小值是a,最大值是 ...
- ava包(package)的命名规范,java中package命名规则
Java的包名都有小写单词组成,类名首字母大写:包的路径符合所开发的 系统模块的 定义,比如生产对生产,物资对物资,基础类对基础类.以便看了包名就明白是哪个模块,从而直接到对应包里找相应的实现. 由于 ...
- LoadRunner对不同协议的选择
LoadRunner对不同协议的选择 大家常用的是Loadrunner测试web(Http/Html),但其实协议多种多样.在B/S结构的网站多种业务的特点需要选择不同的协议,协议如何选择呢,寻找了相 ...
- 30:最小的K个数
import java.util.ArrayList; import java.util.TreeSet; /** * 面试题30:最小的K个数 * 输入n个整数,找出其中最小的K个数.例如输入4,5 ...
- React Native之网页组件WebView的使用与通信
在实际开发中,我们通常会嵌入一些html页面,官方为我们提供了一个非常好用的网页组件WebView,通过这个组件我们可以通过传入一个url或者是传入一段html 一. WebView的基本属性方法介绍 ...
- 1010 Radix (25)(25 point(s))
problem Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true ...
- Hibernate与Mybatis对比
Hibernate与Mybatis对比 两者相同点 Hibernate与MyBatis都可以是通过SessionFactoryBuider由XML配置文件生成SessionFactory,然后由Ses ...
- poj3537 Crosses and Crosses 博弈论
大意: 给定一个\(1 * n\)的棋盘,你和对手轮流在上面画"X" 当出现三个连续的X时,最后一步操作的人胜利 不难发现,在棋盘中画了一个X之后 问题等价于两个一样的子游戏 然后 ...