org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

时间:2023-03-08 18:48:06

org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

batch:批量

unexpected:意想不到的

actual:实际

expected:预期

报错原因:使用Hibernate的update进行更新时,对象的主键值为空。