I have HABTM associations between two models but can only get find to return
one level. I can return several levels with other associations but think I must
be doing something wtong with HABTM.
Controller/SchedulesController.php
$this->Schedule->find('first', array(
'contain' => array(
'Association' => array(
'Schedule'
)
)
));
Model/Schedule.php
public $actsAs = array('Containable');
public $hasAndBelongToMany = array(
'Association'
);
Model/Association.php
public $actsAs = array('Containable');
public $hasAndBelongsToMany = array(
'Schedule'
);
At the moment I only get...
array(
'Schedule' => array(
...
),
'Association' => array(
(int) 0 => array(
...
'AssociationsSchedule' => array(
...
)
)
)
...but I would like Schedule -> Association -> Schedule
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
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].
Visit this group at http://groups.google.com/group/cake-php?hl=en.