Re: Get a hasAndBelongsToMany colection a controller

2007-11-30 Thread Dardo Sordi Bogado
Try this $his->User->recursive = 2; $this->set('data', $this->User->read(null, $id)); In the view: pr($data); // <--- data is a bad name :P 2007/11/29, bibi <[EMAIL PROTECTED]>: > > I have a model witch use a hasAndBelongsToMany collection > > class User extends AppModel > { > var $h

Get a hasAndBelongsToMany colection a controller

2007-11-29 Thread bibi
I have a model witch use a hasAndBelongsToMany collection class User extends AppModel { var $hasAndBelongsToMany = array( 'Photo' => array('className' => 'Photo', 'joinTable' => 'photo_users', 'associationForeignKey' => 'User_id', 'foreignKey' => 'Photo_id', 'unique'