所以我试图让 2 个域从一个域继承。
abstract class Pet {
Nose nose
static hasMany = [legs: Leg]
}
class Dog extends Pet {
static hasMany = [friends: Friend]
}
我收到一个错误:
Caused by: org.codehaus.groovy.grails.exceptions.InvalidPropertyException: No property found for name [legs] for class [class animals.Dog]
有任何想法吗?我需要做些什么来结合hasManys吗?