public function getAncestors(AbstractNestedNode $node, $depth = null, $includeNode = false)
    {
        $q = $this->createQueryBuilder('n')
                ->andIsAncestorOf($node, !$includeNode);

        if (null !== $depth) {
            $q->andLevelIsUpperThan($node->getLevel() - $depth);
        }

        return $q->orderBy('n._rightnode', 'desc')
                        ->getQuery()
                        ->getResult();
    }