I'm looking for a way to have the results of a query that uses the Containable
behavior to be formatted the same way as find('list')
results are. E.g.:
$this->ModelA->find('all', array(
'contain' => array(
'ModelB' => array(
'ModelC' => array(
// This does NOT work but I need ModelC's fields to be formatted as an associative array where IDs are keys and names are values
'fields' => array('id' => 'name')
)
)
)
));
NOTE: Setting recursive to 1 or 2 instead of using Containable
is not an option unless there's no available solution with Containable
.