Three things come to mind:
* Model names are singular in cakephp, not plural. [see manual]
* If you set the recursive variable higher, you should get the rights
[see manual]
* why are you declaring all that fluff you don't need?
class User extends AppModel {
var $hasAndBelongsToMany = array(
'Group' => array('joinTable' => 'users_groups')
);
}
class Group extends AppModel {
var $hasAndBelongsToMany = array(
'User' => array('joinTable' => 'users_groups')
);
var $hasMany = array(
'Right'
);
}
$this->User->recursive = 2;
$user = $this->User->findByLogin('fred');
debug($user);
// you'll see the rights in the array
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---