Jordi Boggiano 14 éve
szülő
commit
92c32ce2e2
1 módosított fájl, 4 hozzáadás és 4 törlés
  1. 4 4
      src/Packagist/WebBundle/Entity/PackageRepository.php

+ 4 - 4
src/Packagist/WebBundle/Entity/PackageRepository.php

@@ -38,8 +38,8 @@ class PackageRepository extends EntityRepository
     public function findByTag($name)
     {
         $qb = $this->getBaseQueryBuilder()
-            // eliminate tags from the select, otherwise only $name is visible in the results' tags
-            ->select('p, v, m')
+            // eliminate maintainers & tags from the select, because of the groupBy
+            ->select('p, v')
             ->where('t.name = ?0')
             ->groupBy('p.id')
             ->setParameters(array($name));
@@ -49,8 +49,8 @@ class PackageRepository extends EntityRepository
     public function findByMaintainer(User $user)
     {
         $qb = $this->getBaseQueryBuilder()
-            // eliminate maintainers from the select, otherwise only $user is visible in the results' maintainers
-            ->select('p, v, t')
+            // eliminate maintainers & tags from the select, because of the groupBy
+            ->select('p, v')
             ->where('m.id = ?0')
             ->groupBy('p.id')
             ->setParameters(array($user->getId()));