用 grails 做这样的事情的正确方法是什么:
class myDomainThing {
String description
MyOtherDomainThing otherThing
static constraints = {
description(nullable:if(otherThing))
otherThing(nullable:if(description))
}
}
所以我要么希望有一个指向 otherDomainThing 的链接,要么我想要一个字符串描述。