Parameter 'ids' not found. Available parameters are [array]
传的参数是一个数组, Long[] ids
后台错误写法
<delete id="deleteById">
delete from table
where id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
正确写法
<delete id="deleteById">
delete from table
where id in
<foreach collection="array" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
当mybatis传入参数为list集合的时候;mybatis会自动把其封装为一个map;会以“list”作为key;每个元素的值作为value;格式为 Map<"list",value>
当mybatis传入参数为数组的时候mybatis会自动把其封装为一个map;会以“array”作为key;每个元素的值作为value;格式为Map<"array",value>
Parameter 'ids' not found. Available parameters are [array]的更多相关文章
- spring 整合Mybatis 错误:Parameter 'items_id' not found. Available parameters are [array]
运行环境:jdk1.7.0_17+tomcat 7 + spring:3.2.0 +mybatis:3.2.7+ eclipse 错误:Parameter 'items_id' not found. ...
- mybatis 批量更新 Parameter '__frch_item_0' not found. Available parameters are [list]
一次在做批量更新数据的时候报错 Parameter '__frch_item_0' not found. Available parameters are [list] 记过反复查找,最后才发现是一个 ...
- MyBatis批量操作报错:Parameter 'xxxList' not found. Available parameters are [list]
问题背景: 在Dao中使用MyBatis进行查询操作,参数是传的一个List:studentNameList,但是在执行查询的时候报错,具体日志如下: com.chenzhou.base.mybati ...
- mybatis 批量增加 Parameter '__frch_item_0' not found. Available parameters are [list]
当在mybatis用到foreach的时候,会报这个错误Parameter '__frch_item_0' not found. Available parameters are [list]会出现的 ...
- Parameter 'list1' not found. Available parameters are [list] 解析
在使用foreach语句时会经常报Parameter ‘ordersList’ not found. Available parameters are [list] 解析这个错误,造成这个错误的主要原 ...
- 初学Java9:学习Mybatis时报错:Parameter 'name' not found. Available parameters are [1, 0, param1, param2]
报错-->Parameter 'name' not found. Available parameters are [1, 0, param1, param2] 百度找到这篇文章完成修改 htt ...
- org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters are [1, 0, param1, param2]
Spring+mybatis错误:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.bi ...
- Mybatis报错:Parameter 'list' not found. Available parameters are [groupList, param1]
GroupDao.java 里面定义的方法: void batchInsertLog(@Param("groupList") List<MktPromotionIntegra ...
- ### Cause: org.apache.ibatis.binding.BindingException: Parameter 'name' not found. Available parameters are [arg1, arg0, param1, param2]
org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: org.apache.ib ...
随机推荐
- SQL Server2008进程堵塞处理方法
进程堵塞处理方法: select * from sys.sysprocesses where blocked <>0 and DB_NAME(dbid)='GSHCPDB' ##查询堵 ...
- 第六周LINUX学习笔记
DNS服务 DNS:Domain Name Service //协议 实现:BIND(Berkeley Internet Name Domain) 监听端口: UDP:5 ...
- odoo action方法
二.动作按钮里面也可以由字段判断: def action_select_sale_order_line(self,cr,uid,ids,date_begin,date_end,context=None ...
- 如何在eclipse中快速debug到想要的参数条件场景下
前言 俗话说,工欲善其事必先利其器. 对于我们经常使用的开发工具多一些了解,这也是对我们自己工作效率的一种提升. 场景 作为开发,我们经常会遇到各种bug,大部分的bug很明确,我们直接可以打断点定位 ...
- Go中链路层套接字的实践
1. 介绍 2. 服务端 3. 协议头部 4. 客户端 5. 总结 1. 介绍 接上次的博客,按照约定的划分,还有一层链路层socket.这一层就可以自定义链路层的协议头部(header)了,下面是目 ...
- 编辑器开发之 Selection 对象的学习
上一篇,介绍了 range 对象的一些属性和方法,了解了一些基本操作,现在来介绍另外一个重要的对象:selection 对象: MDN 的解释是:Selection 对象表示用户选择的文本范围或插入符 ...
- 从壹开始前后端分离 [ vue + .netcore 补充教程 ] 三十║ Nuxt实战:动态路由+同构
上期回顾 说接上文<二九║ Nuxt实战:异步实现数据双端渲染>,昨天咱们通过项目二的首页数据处理,简单了解到了 nuxt 异步数据获取的作用,以及亲身体验了几个重要文件夹的意义,整篇文章 ...
- Linux篇---ftp服务器的搭建
一.前述 企业中linux搭建ftp服务器还是很实用的,所以本文针对centoos7和centoos6搭建服务器教程做个总结. 二.具体 1.显示如下图则表示已安装 vsftp软件.如果未显示则需要安 ...
- Mybatis之旅第三篇-SqlMapConfig.xml全局配置文件解析
一.前言 刚换工作,为了更快的学习框架和了解业务,基本每天都会加班,导致隔了几天没有进行总结,心里总觉得不安,工作年限越长越感到学习的重要性,坚持下去!!! 经过前两篇的总结,已经基本掌握了mybat ...
- Spring之旅第五篇-AOP详解
一.什么是AOP? Aspect oritention programming(面向切面编程),AOP是一种思想,高度概括的话是“横向重复,纵向抽取”,如何理解呢?举个例子:访问页面时需要权限认证,如 ...