14
정적 hasOne 맵을 사용하는 것과 도메인 클래스에서 오브젝트를 작성하는 것의 차이점에 대해서는 약간 혼란 스럽습니다. 둘의 차이점은 무엇입니까? 즉.Grails GORM 구성 또는 hasOne?
class DegreeProgram {
String degreeName
Date programOfStudyApproval
static hasOne = [committee:GraduateCommittee]
}
GraduateCommittee 다른 GORM 도메인 모델 클래스이다
class DegreeProgram {
String degreeName
Date programOfStudyApproval
GraduateCommittee committee
}
대.
내가 그 전에 미끄러 져 거라고하지만 정말 등록하지 않았다. 어떤 경우에 반대쪽으로 부모 키를 저장하고 싶습니까? –
@VisionarySoftwareSolutions 나는 하나의 부모 만 참조 할 수 있기 때문에 다른 부모에게 속하지 않는지 확인하는 데 유용 할 것 같다. –