【发布时间】:2011-06-09 21:38:37
【问题描述】:
可以在 GORM / Grails 中进行自动关系获取吗?
class Person {
static hasMany = [cars : Car]
}
class Car {
static belongsTo = [owner : Person]
}
然后像这样使用这种关系:
person = Person.get(1);
person.cars.each() { print it; }
【问题讨论】:
标签: grails orm grails-orm fetching-strategy