Tuesday, August 28, 2012

HABTM with keys pointing to itself.

So I have a list of courses.  Some of those courses have prerequisites that are also courses.  So I setup a model called Course and a database table called courses.  I have another model called CoursesCourse and a table called courses_courses.  How would I setup it up so view I view a course I get its info and the course it requires (and if possible the courses required by it)?

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 

No comments: