关于Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]错误

控制台报错:

08:07:09.293 [http-bio-8080-exec-2] ERROR org.hibernate.internal.SessionImpl - HHH000346: Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]

查阅许多博客得出了自己的理解,请大家指教:

由于存在隐藏表单进行回显,导致提交时value不是Null,而是"",而我设置的主键生成策略是uuid,所以无法赋值导致错误,解决方法是隐藏表单外面添加了if判断!


修改后为

原文地址:https://www.cnblogs.com/xiachan/p/10290540.html