我对使用静态hasOne映射和在域类中组合对象之间的区别感到困惑。两者有什么不同?即
class DegreeProgram {
String degreeName
Date programOfStudyApproval
static hasOne = [committee:GraduateCommittee]
}
与
class DegreeProgram {
String degreeName
Date programOfStudyApproval
GraduateCommittee committee
}
其中GraduateCommittee是另一个GORM领域模型类。