sharding jdbc, when insert config useGeneratedKeys , in one Transactional , the ID obtained by batch insertion is the first one
sharding jdbc 4.0.0
mybatis spring
sql mapper:
Hi, do you think your issue is similar to the issues in #6895?
Hi, do you think your issue is similar to the issues in #6895?
It could be similar. BatchInsert under the same transaction #6895 is batchInsert in one sql ,like "insert into table values(),(),();" my question is single insert ,like "insert into table values();" but Loop in the java code to call the sql, the loop is managed by transactions like for(A a : aList){ singleInsert(a); }
It could be similar. BatchInsert under the same transaction
If so, it has been identified as a bug indeed. Please wait for it fixed. I believe the next release will include this bugfix certainly.
Hi, @terrymanu Ping here.
I had the same problem version: 5.1.1
bdf_teacher (teacher_name, class_id)
values (#{teacherName}, #{classId})