No row with the given identifier exists

来源:互联网 发布:fanuc机器人仿真软件 编辑:程序博客网 时间:2024/05/22 13:21

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
}
}

原创粉丝点击