In CakePHP, how do you select just a subtree in a model which actsAs
tree?
I tried this, to find the tree headed by the item with label = "My Label"
$this->find("threaded", array(
"conditions" => array(
"label" => "My Label"
)
));
...however looking at the logs, it runs this SQL:
SELECT Menu.id, Menu.parent_id, Menu.lft, Menu.rght, Menu.label, Menu.link
FROM menus Menu
WHERE label = 'My Label'
Which obviously only selects the one node, and not all its children.