public function findAllWithCategories()
    {
        // select
        $qb = $this->getQueryBuilder()
            ->select('f, c')
            ->innerJoin('f.categories', 'c')
            ->innerJoin('c.subcategories', 's');

        // sort by family and category id
        $qb->orderBy('f.order', 'asc')
            ->addOrderBy('c.id', 'asc');

        return $qb->getQuery()
            ->getResult();
    }