1. 程式人生 > >後臺報錯 No row with the given identifier exists

後臺報錯 No row with the given identifier exists

table ide 報錯 問題 沒有 span ber 不存在 產生原因

產生原因:

  數據庫表裏數據問題

分析:

  有兩張表,table1table2,table1:table2=1:n 。當hibernate查找的時候,table2裏的外鍵id2沒有與table1中的id相匹配的,這樣就會報No row with the given identifier exists這個錯.(一句話,就是數據的問題!)

解決:

  刪掉table1中id2在table2中id不存在的數據,或將id2置為null。

後臺報錯 No row with the given identifier exists