-3
我想確保在這裏有適當的關聯。下面我列出我的模型,那麼所有的關聯:CakePHP:Model Associates
- 場(包含「student_id數據」爲教師的課堂教學和課程類型字段,classroom_id「course_type_id」)
- CourseType
- 教室
- 學生
- StudentCourses(當一個學生報爲一療程..它包含 'student_id數據' 和 'COURSE_ID')
這裏是我有的協會:
- 當然:'belongsTo'CourseType; 'belongsTo'課堂; 'belongsTo'學生(指導員); 'hasAndBelongsToMany' StudentCourse
- CourseType: '的hasMany' 課程
- 教室: '的hasMany' 課程
- 學生: '的hasMany' 課程; 'hasAndBelongsToMany'StudentCourse
這種看法合適?
這絕對不是家庭作業。我有關聯問題,我無法想象它.. – execv 2012-02-28 19:40:06