美文网首页
2019-07-17-mybatis 更新、删除、插入 错误的返

2019-07-17-mybatis 更新、删除、插入 错误的返

作者: 一_贫 | 来源:发表于2019-12-26 09:35 被阅读0次

https://blog.csdn.net/WJ_toy/article/details/84678914
https://www.cnblogs.com/xingyunblog/p/6243179.html

在jdbc连接中加一句话:useAffectedRows=true

MyBatis发现更新和插入返回值一直为"-2147482646"的错误是由defaultExecutorType设置引起的,如果设置为BATCH,更新返回值就会丢失。mybatis官方的讨论列表,这句很关键:“If the BATCH
executor is in use, the update counts are being lost. ”

相关文章

网友评论

      本文标题:2019-07-17-mybatis 更新、删除、插入 错误的返

      本文链接:https://www.haomeiwen.com/subject/sheqlctx.html