后台控制台报错:Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

这个异常是由于主键设置为自增长,而在我们插入记录的时候设置了ID的值导致的。

另外如果传入id为NuLl,也会导致错误。

猜你喜欢

转载自blog.csdn.net/qq_40603010/article/details/108881040
今日推荐