Hibernate 報錯:Batch update returned unexpected row count from update [0]; actual row count

使用Hibernate的saveOrUpdateAll()方法時,報錯:Batch update returned unexpected row count from update [0]; actual row count;

錯誤原因:主鍵人工給定,而hbm文件則使用了native生成策略,改爲:assigned;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章