Comments (11)
我正在尝试兼容
from mybatis-plus.
经查实 mp最新的批处理与 jdbc的批处理参数 rewriteBatchedStatements=true 不兼容
from mybatis-plus.
没有什么问题,SUCCESS_NO_INFO代表”指示批处理语句已成功执行,但没有可用的受影响行数的计数的常量。“
也就是这次saveBatch操作没有修改行数量,mp里面返回值是boolean类似insert和remove的方法false都代表的是没有行数修改,抛出异常才代表执行失败。
from mybatis-plus.
没有什么问题,SUCCESS_NO_INFO代表”指示批处理语句已成功执行,但没有可用的受影响行数的计数的常量。“ 也就是这次saveBatch操作没有修改行数量,mp里面返回值是boolean类似insert和remove的方法false都代表的是没有行数修改,抛出异常才代表执行失败。
但是3.5.7版本Db.saveBatch 无法正确判断批量插入是否成功, Db.updateBatchById却可以正常判断
from mybatis-plus.
我用ruoyi-vue-plus最新代码测试, 批量插入也是数据库成功, 方法永远返回false
from mybatis-plus.
确实存在这个问题 插入已经成功了 但确实返回false
from mybatis-plus.
无法重现该问题,看看是不是 RuoyiPlus 配置什么批量操作引起的
from mybatis-plus.
能给个复现demo吗
from mybatis-plus.
解决方案: 驱动连接去掉 rewriteBatchedStatements=true
from mybatis-plus.
解决方案: 驱动连接去掉 rewriteBatchedStatements=true
以了解, 并已经去掉参数 测试成功
from mybatis-plus.
直接用BaseMapper#insert(java.util.Collection),不关心里面具体的批量结果(来自驱动层执行的)就忽视返回值就行。
from mybatis-plus.
Related Issues (20)
- 使用分页插件时在SQL中使用了Group By 语句后 不管加不加Where 条件都会被拦截器拦截 非法SQL,必须要有where条件 HOT 3
- 严重问题: 查询条件全部丢失 HOT 9
- Occasionally occurs java.lang.NullPointerException,but retrying fixes it HOT 6
- 严重问题:3.5.7重写了deleteByIds,如果项目使用了乐观锁,做了空异常校验,会抛出异常
- QueryWrapper查询时,自动调用了TypeHandler对参数进行了加密 HOT 2
- 如何处理AMapper中某个函数初始化依赖BMapper某个函数的的查询结果中的数据 HOT 1
- 有支持Wrapper多表jion的计划吗 HOT 4
- IllegalSQLInnerInterceptor 和 BaseMapper.selectCount(Wrapper)+逻辑删除 冲突问题 HOT 7
- 映射的表实体类上使用多行注释使用注解@TableName调用mybatis-plus自动装配的SQL都会造成读取到多行注释的内容 HOT 1
- 逻辑删除插件导致Jsql解析错误 HOT 2
- mysql表主键 ID 重复 HOT 6
- 建议取消数据层的saveBatch等方法的@Transactional注解,交由业务层自行管理 HOT 5
- SqlServerQuery tablesSql 表描述乱码 HOT 1
- 在使用left join编写做多表联查时当我将从表中的字段作为查询条件的时候报错 HOT 1
- postgres uuid 自定义typehandler 和 自定义主键生成策略,主键赋值时出错。 HOT 5
- 关于官网指南中likeLeft、likeRight功能解释的错误
- mapper.insert(entity) An error occurred Illegal group reference HOT 1
- [Bug]: mybatis-plus-boot-starter 3.5.5 使用逻辑删除功能后,saveOrUpdateBatch报主键已存在错误 HOT 1
- [Bug]: 自定义的通过wrapper构造器获取条件执行的物理删除SQL注入器,执行的时候会给莫名加上分号,导致执行报错 HOT 1
- [Bug]: 3.5.7版本生成in条件不带上括号导致报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybatis-plus.