Giter Club home page Giter Club logo

Comments (11)

VampireAchao avatar VampireAchao commented on July 21, 2024 2

我正在尝试兼容

from mybatis-plus.

JavaLionLi avatar JavaLionLi commented on July 21, 2024 1

经查实 mp最新的批处理与 jdbc的批处理参数 rewriteBatchedStatements=true 不兼容

from mybatis-plus.

xxx-tea avatar xxx-tea commented on July 21, 2024

没有什么问题,SUCCESS_NO_INFO代表”指示批处理语句已成功执行,但没有可用的受影响行数的计数的常量。“
也就是这次saveBatch操作没有修改行数量,mp里面返回值是boolean类似insert和remove的方法false都代表的是没有行数修改,抛出异常才代表执行失败。

from mybatis-plus.

zhww9206 avatar zhww9206 commented on July 21, 2024

没有什么问题,SUCCESS_NO_INFO代表”指示批处理语句已成功执行,但没有可用的受影响行数的计数的常量。“ 也就是这次saveBatch操作没有修改行数量,mp里面返回值是boolean类似insert和remove的方法false都代表的是没有行数修改,抛出异常才代表执行失败。

但是3.5.7版本Db.saveBatch 无法正确判断批量插入是否成功, Db.updateBatchById却可以正常判断

3.5.6版本Db.saveBatch 是这样的
image

from mybatis-plus.

zhww9206 avatar zhww9206 commented on July 21, 2024

我用ruoyi-vue-plus最新代码测试, 批量插入也是数据库成功, 方法永远返回false
image
image
image
image

from mybatis-plus.

JavaLionLi avatar JavaLionLi commented on July 21, 2024

确实存在这个问题 插入已经成功了 但确实返回false

from mybatis-plus.

qmdx avatar qmdx commented on July 21, 2024

无法重现该问题,看看是不是 RuoyiPlus 配置什么批量操作引起的

from mybatis-plus.

VampireAchao avatar VampireAchao commented on July 21, 2024

能给个复现demo吗

from mybatis-plus.

qmdx avatar qmdx commented on July 21, 2024

解决方案: 驱动连接去掉 rewriteBatchedStatements=true

from mybatis-plus.

zhww9206 avatar zhww9206 commented on July 21, 2024

解决方案: 驱动连接去掉 rewriteBatchedStatements=true

以了解, 并已经去掉参数 测试成功

from mybatis-plus.

nieqiurong avatar nieqiurong commented on July 21, 2024

直接用BaseMapper#insert(java.util.Collection),不关心里面具体的批量结果(来自驱动层执行的)就忽视返回值就行。

from mybatis-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.