src/PHPDish/Bundle/PostBundle/Service/CategoryManager.php
public function createGetUserCategoriesQueryBuilder(UserInterface $user)
    {
        return $this->getCategoryRepository()->createQueryBuilder('c')
            ->where('c.creator = :userId')->setParameter('userId', $user->getId())
            ->orderBy('c.createdAt', 'desc');
    }
public function createGetUserCategoriesQueryBuilder(UserInterface $user)
    {
        return $this->getCategoryRepository()->createQueryBuilder('c')
            ->where('c.creator = :userId')->setParameter('userId', $user->getId())
            ->orderBy('c.createdAt', 'desc');
    }
创建用户专栏查询的query builder.

@param UserInterface $user

@return \Doctrine\ORM\QueryBuilder