http://www.doctrine-project.org/projects/orm/1.2/docs/manual/hierarchical-data%3Anested-set%3Aworking-with-trees%3Aexamining-and-retrieving-descendants/en
$children = $category->getNode()->getChildren();
$descendants = $category->getNode()->getDescendants();
$ancestors = $category->getNode()->getAncestors();
$numChildren = $category->getNode()->getNumberChildren();
$numDescendants = $category->getNode()->getNumberDescendants();
The getDescendants() and getAncestors() both accept a parameter that you can use to
specify the depth of the resulting branch. For example getDescendants(1) retrieves only the direct descendants (the descendants that are 1 level below, that's the same as getChildren()). In the same fashion getAncestors(1) would only retrieve the direct ancestor (the parent), etc. getAncestors() can be very useful to efficiently determine the path of this node up to the root node or up to some specific ancestor (i.e. to construct a
breadcrumb navigation).
$treeObject = dmDb::table('Category')->getTree();
$branch = $treeObject->fetchBranch(4);