写入数据库出问题

控制台报错:

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判断!


猜你喜欢

转载自blog.csdn.net/CodingUp/article/details/80722421