No row with the given identifier exists

class A {
B b
}
class B {
String name
}
If you have an A has B relationship. If from the database end, A says has B and with B's id, but actually that B's id doesn't exist in B's table. Then it will complains: No row with the given identifier exists
A workaround of this is to use ignoreNoFound like below
class A {
B b
static mapping = {
b ignoreNotfound : true
}
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章