原文:Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

用Hibernate保存對象的時候,Eclipse后台提示出現這個錯誤: Batch update returned unexpected row count from update actual row count: expected: ,原因是給id設置了自動生成策略,但是卻給這個對象的id手動設置了值,Hibernate在其自身的緩存中根據此id找不到對象,就會報這個錯。 解決的方法很簡單 ...

2020-05-20 07:31 0 2103 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM