Reputation: 601
I've got these simple models:
// ActivityLog class ActivityLog extends AppModel { public $name = 'ActivityLog'; public $useTable = "activity_logs"; public $hasMeny = array("ActivityLogMedia"); } // ActivityLogMedia class ActivityLogMedia extends AppModel { public $name = 'ActivityLogMedia'; public $useTable = "activity_logs_media"; public $belongsTo = array('ActivityLog','Media'); } // Media class Media extends AppModel { public $name = 'Media'; public $useTable = "media"; public $hasMeny = "ActivityLogMedia"; }
when I try to do this find:
$this->ActivityLog->find('all', array( 'conditions' => array('ActivityLog.id' => $ret['ActivityLog']['id']), 'recursive' => 2 ));
Cake doesn't return any ActivityLog associated models.
Can anybody give me an explanation and/or a solution?
Upvotes: 0
Views: 151