public function getFlatTreeQB($path = '', $rootAlias = 't', $extraParams = array())
    {
        $qb = $this->createQueryBuilder($rootAlias)
            ->andWhere($rootAlias.'.materializedPath LIKE :path')
            ->addOrderBy($rootAlias.'.materializedPath', 'ASC')
            ->setParameter('path', $path.'%')
        ;

        $parentId = basename($path);
        if ($parentId) {
            $qb
                ->orWhere($rootAlias.'.id = :parent')
                ->setParameter('parent', $parentId)
            ;
        }

        $this->addFlatTreeConditions($qb, $extraParams);

        return $qb;
    }