>From the fine manual:

conditions: an array of find() compatible conditions or SQL strings
such as array('User.active' => true)

It doesn't appear to be used, however.

public $belongsTo = array(
        'Project' => array(
                'className' => 'Project',
                'foreignKey' => 'project_id',
                'conditions' => array('Project.deleted_at' => '0')
        )
);

Project model:

public $hasMany = array(
        'Expression' => array(
                'className' => 'Expression',
                'foreignKey' => 'project_id',
                'conditions' => array('Project.deleted_at' => '0'),
                'dependent' => true
        )
);

I know I can include it in the find() array but it would be nice not
to have to include it each time. I presume that's why it's available
here.

I see that 'conditions' is not dealt with in
Model::_generateAssociation() method. Has anyone seen this working?

-- 
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

Reply via email to