From 5778404813f71476a5285a226378eb53a0745b7f Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Tue, 23 Jun 2015 14:19:57 +0300 Subject: [PATCH] Query crutchy fix. --- src/Skobkin/Bundle/PointToolsBundle/Entity/UserRepository.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRepository.php b/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRepository.php index e8092eb..3c9db8d 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRepository.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRepository.php @@ -67,7 +67,8 @@ class UserRepository extends EntityRepository throw new \InvalidArgumentException('$limit must be an integer'); } - $qb = $this->createQueryBuilder('s'); + // TODO: refactor query + $qb = $this->getEntityManager()->getRepository('SkobkinPointToolsBundle:Subscription')->createQueryBuilder('s'); return $qb ->select(['COUNT(s.subscriber) as cnt', 'NEW SkobkinPointToolsBundle:TopUserDTO(a.login, COUNT(s.subscriber))'])