更新
我有一个域类如下
class Training{
// has one createdBy object references User domain and
// has one course object references Course domain
// has One Trainer1 and Trainer2 objects refernces Trainer Object.
}
class Trainer{
String name
//can have many trainings.
//If Trainer gets deleted, the trainings of him must be deleted
}
Class User{
String name
// can have many trainings.
}
class Course{
String name
//If Course gets deleted, Trainings of this course must be deleted
// can have many trainings.
}
我有一个培训创建页面,我必须在其中填充已保存的课程、用户、Trainer1 和 Trainer2。我没有在创建培训时保存它们。
那么,如何在grails中指定关系