You should be able to use a HasMany / BelongsTo relationship.
Courses belongsTo CoursePrerequisites
CoursePrerequisites HasMany Courses
This way you can have say 15 Course Prerequisites and 10 courses, some
courses can share some of the same prerequisites.
On 05/02/2012 14:25, Manouchehr Boshaq wrote:
> hi
> first i'm member of group but i cant post to moderator .
> second:
> i have a table for storing course data. any course has 1 or more
> prerequisites of courses.
> how can i relate HABTM table with itself.
>
> thanks
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and
> help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this
> group at http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment