1. 程式人生 > >關於Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]錯誤

關於Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]錯誤

flush hibernate update 自己的 設置 uri 自己 mage ror

控制臺報錯:

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

技術分享圖片
修改後為

技術分享圖片

關於Error during managed flush [Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1]錯誤