bindModel should works with the behaviors of the binded model have in
$actsAs?
i have this:
ModelA:
$this->bindModel(array('hasMany' => array('ModelB' =>
array('className' => 'ModelB'))));
$this->contain(array('ModelB'));
pr($this->read(null, $id));
ModelB:
public $actsAs = array('Test');
TestBehavior:
function beforeFind(&$model, $queryData) {
$queryData['conditions'][$model->alias.'.user_id'] = User::get('id');
return $queryData;
}
The beforeFind function is never fired,
--
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
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php