I tried to find this everywhere but I cant. Here is my problem:
Lets say I have models associated like this:
- Student (has many Memberships)
- Membership (belongs to Student and TeacherCourse)
- TeacherCourse (belongs to Teacher and Course)
- Teacher (has many TeacherCourses)
- Course (has many TeacherCourses)
When I use membershipsController
to send all membership to the view, I get only for example $membership['Membership']['id']
or $membership['TeacherCourse']['id']
BUT NOT $membership['TeacherCourse']['Teacher']['id']
...
Which means I get info on Memberships and TeacherCourse because they are directly associated. My question is how can I also get info about Teachers or Courses directly?