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

 

 

这是因为没有设置要更新的主键导致的,只要设置了要更新的主键就能更新成功(没有主键当然不能更新)

 

posted @ 2019-03-18 16:37  由良大小姐  阅读(421)  评论(0编辑  收藏  举报