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

 原因,主键设置了自增属性,又在创建该类对象时给主键赋值,

解决方法:取消主键的自增属性(在数据库中操作);

猜你喜欢

转载自blog.csdn.net/qq_33543634/article/details/80878768