class First {
String text
Second second
static constraints = {
}
}
class Second {
String name
static constraints = {
}
}
当我删除第二类对象时,我收到如下错误:
Cannot delete or update a parent row: a foreign key constraint fails.
我想只删除First内部的Second实例。
答案 0 :(得分:0)