mybatisplus坑 insert标签insert into select无参数问题
实际项目中发现
<insert id="xxx">
insert into xxxx select xxxx
</insert>
会报错
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.lang.NullPointerException
### Cause: java.lang.NullPointerException
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
几经排查
com.baomidou.mybatisplus.processBatch方法
TableInfo tableInfo = TableInfoHelper.getTableInfo(parameterObject.getClass());
这里会取参数对象作为表信息,由于没传参数,所以报错
改用<update>标签,问题解决
mybatisplus坑 insert标签insert into select无参数问题相关推荐
- mysql 插入数据 自增长_MySQL ------ 插入数据(INSERT和insert select)(二十)
数据插入(INSERT): 用来插入(或添加)行到数据表中.也可利用mysql 的安全机制机制使用insert 语句 可使用的四种方式:插入完整的行,插入行的一部分,插入多行和插入某些查询结果 一.插 ...
- insert exec 语句不能嵌套_MySQL ------ 插入数据(INSERT和insert select)(二十)
数据插入(INSERT): 用来插入(或添加)行到数据表中.也可利用mysql 的安全机制机制使用insert 语句 可使用的四种方式:插入完整的行,插入行的一部分,插入多行和插入某些查询结果 一.插 ...
- MyBatis中如何使用insert标签呢?
转自: MyBatis中如何使用insert标签呢? MyBatis insert 标签的功能 MyBatis insert标签的功能,用于定义一个插入语句,执行插入操作, MyBatis运行完 ...
- oracle 复制数据 insert into、as select
搭建数据: [sql] view plaincopy create table tb_user1 (id integer primary key, user_name varchar2(20) not ...
- 将insert语句转化为select语句,进行校验,验证是否插入成功
前言 公司的测试和运维不太懂sql,每次将sql文件交给他们到测试或者生产数据库中执行sql的时候,他们都是全部执行,不看是否执行成功.因此,就会导致有些insert语句没有执行成功,等到功能验证 ...
- c mysql insert语句_MySQL_mysql insert详细讲解,INSERT语法
INSERT [LOW_PRIORITY |DELA - phpStudy...
INSERT语法 INSERT [LOW_PRIORITY |DELAYED| HIGH_PRIORITY] [IGNORE] [INTO]tbl_name[(col_name,...)] VALUE ...
- mysql insert delayed_mysql insert的几点操作(DELAYED 、IGNORE、ON DUPLICATE KEY UPDATE )
INSERT语法 INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [(col_name,...)] V ...
- Mysql insert 多种使用方式(insert into/insert ignore /replace into/on deplicate key update)
Mysql insert 多种使用方式(insert into/insert ignore /replace into/on deplicate key update) 1 insert into t ...
- Oracle中的insert/insert all/insert first
Oracle中的insert/insert all/insert first 1.概念 Oracle 中insert all 是指把 同一批 数据插入到 不同的表 中. 假如,现在有个需求,把表 t ...
最新文章
- 根据镜像安装oracle插件,docker镜像alpine中安装oracle客户端
- [END_OBJECT] but found [FIELD_NAME]')
- 【ASP】Menu菜单导航
- Wechat公众号授权登录接口
- 一季度平板电脑市场:苹果稳居第一,华为第二!
- OpenShift 4 - Ingress、Route与Shard
- 如果女孩子一辈子不结婚,那会是怎样的人生?
- 防止孩子使用计算机的软件,如何防止熊孩纸在电脑里乱装软件
- 淘宝手淘搜索怎么做?大神导航,一个神奇的网站,从此开启大神之路!
- 干货 | 100亿+数据量,每天50W+查询,携程酒店数据智能平台实践
- 用VBA制作Excel单选框和多选框
- html制作网页毕业论文,网页设计与制作 (毕业论文)
- 截至9月28日聚合支付牌照知多少,附名单
- ImageNet千分类标签翻译
- java tls_Java客户端中具有SNI的TLS
- 一款免费的截图、滚动截屏软件
- html自动跳转加微信好友,底部固定div并跳转复制微信号添加好友
- PTA 3+2 转段考试 数据库mysql(3篇)
- AARRR模型——揭开应用推广运营背后的秘密
- 再见,世界首富!再见,马云!