Search code examples
phpsymfony1doctrinenested-sets

Symfony Doctrine Nested Set Path To Root Query


Is there a way in symfony to get from a doctrine nested set the whole path/route from a specified by id element to the root element in a Doctrine_Collection or array ?


Solution

  • I think this should return what you are after:

    $obj->getNode()->getAncestors();
    

    From the docs