wlnirvana / mp-bug

This repo contains code to reproduce a possible bug for mybatis plus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MyBatis Bug(?) Report

TL;DR: saveBatch在IdType为auto模式下,存入数据库后,不能正确更新集合中元素的id

复现

运行此项目,然后访问http://localhost:9000/saveBatchhttp://localhost:9000/saveOneByOne,会看到二者的行为并不一致。其中,saveBatch比较反常,仅下标为0的元素被填入了生成的ID,saveOneByOne则是预期行为,所有元素都会被填入生成的ID。

环境

  • macOS 11.5.2
  • AdoptOpenJDK (build 11.0.8+10)

About

This repo contains code to reproduce a possible bug for mybatis plus


Languages

Language:Java 100.0%