> That doesn't help much, I've tried it and it gives errors like this:
>
> Model "Space" is not associated with model "name" [CORE/cake/libs/
> model/behaviors/containable.php, line 340]
Strange error. Is this what you tried:
function get_structure($user = null) {
$spaces = $this->Space->find('threaded', array(
'conditions' => array('User.id' =>
$user),
'fields' => array('Space.name',
'Space.description', 'Space.created', 'Space.parent_id', 'Space.lft',
'Space.rght', 'User.id', 'User.username'),
'contain' => array(
'User', 'Document'
),
'order' => array('Space.name')
)
);
return array('spaces' => $spaces);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment