src/Sulu/Bundle/CategoryBundle/Entity/CategoryRepository.php
private function getCategoryQuery()
    {
        return $this->createQueryBuilder('category')
            ->leftJoin('category.meta', 'categoryMeta')
            ->leftJoin('category.translations', 'categoryTranslations')
            ->leftJoin('categoryTranslations.keywords', 'categoryKeywords')
            ->leftJoin('category.parent', 'categoryParent')
            ->leftJoin('category.children', 'categoryChildren')
            ->addSelect('categoryMeta')
            ->addSelect('categoryTranslations')
            ->addSelect('categoryKeywords')
            ->addSelect('categoryParent')
            ->addSelect('categoryChildren');
    }
private function getCategoryQuery()
    {
        return $this->createQueryBuilder('category')
            ->leftJoin('category.meta', 'categoryMeta')
            ->leftJoin('category.translations', 'categoryTranslations')
            ->leftJoin('categoryTranslations.keywords', 'categoryKeywords')
            ->leftJoin('category.parent', 'categoryParent')
            ->leftJoin('category.children', 'categoryChildren')
            ->addSelect('categoryMeta')
            ->addSelect('categoryTranslations')
            ->addSelect('categoryKeywords')
            ->addSelect('categoryParent')
            ->addSelect('categoryChildren');
    }
private function getCategoryQuery ( ) { return $ this -> createQueryBuilder ( 'category' ) -> leftJoin ( 'category.meta' , 'categoryMeta' ) -> leftJoin ( 'category.translations' , 'categoryTranslations' ) -> leftJoin ( 'categoryTranslations.keywords' , 'categoryKeywords' ) -> leftJoin ( 'category.parent' , 'categoryParent' ) -> leftJoin ( 'category.children' , 'categoryChildren' ) -> addSelect ( 'categoryMeta' ) -> addSelect ( 'categoryTranslations' ) -> addSelect ( 'categoryKeywords' ) -> addSelect ( 'categoryParent' ) -> addSelect ( 'categoryChildren' ) ; }
Returns the general part of the query.

@return \Doctrine\ORM\QueryBuilder
Returns the general part of the query .