I am not sure how to make it happen with cakephp. I have a "students"
table that has a many to many relationship with the table groups. This
is straightforward to do but the problem is each group also has to
have a leader. The leader of each group is a student also. How do I
define the relevant models to make this setup work? This is what I
have so far.
<?php
class Group extends AppModel{
var $name = 'Group';
var $hasAndBelongsToMany = 'Student';
}
?>
<?php
class Student extends AppModel{
var $name = 'Student';
var $hasAndBelongsToMany = 'Group';
}
?>
--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment