org.hibernate.StaleStateException

来源:互联网 发布:美国 大数据公司 data 编辑:程序博客网 时间:2024/06/06 05:24

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

batch:批量

unexpected:意想不到

row:行

actual:真实所在

expected:预期


出错原因:使用Hibernate的update方法时,主键为空


解决:看实体类中id是否配置了注解


阅读全文
0 0
原创粉丝点击