我正在尝试对Person
s 网络进行建模。一个Person
可以有很多Favorites
。这些收藏夹是固定的并不断扩大。
static hasMany = [favorites : Favorite];
现在我想要Favorite
域类的孩子。在Favorite
我有belongsTo
映射:
static belongsTo = [person : Person];
现在在我的孩子班:
class ColorFavorite extends Favorite
{
String color;
}
这是可能的还是我想远离GORM?实现这样的事情的正确方法是什么?