public function getTreeExceptNodeAndItsChildrenQB(NodeInterface $entity, $rootAlias = 't') { return $this->getFlatTreeQB('', $rootAlias)->andWhere($rootAlias . '.materializedPath NOT LIKE :except_path')->andWhere($rootAlias . '.id != :id')->setParameter('except_path', $entity->getRealMaterializedPath() . '%')->setParameter('id', $entity->getId()); }