register
other register

Friday, June 26, 2009

No row with the given identifier exists

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

No comments: