]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntryRepository.php
first draft of hypermedia implementation
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntryRepository.php
index 1805cf3f4b1b3bfdf284a2517234e7f84c02ebff..32394d2ab148555afa103565eaccac407d755d51 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Wallabag\CoreBundle\Repository;
 
-use Doctrine\ORM\Query;
 use Doctrine\ORM\EntityRepository;
 use Doctrine\ORM\Tools\Pagination\Paginator;
 
@@ -98,13 +97,12 @@ class EntryRepository extends EntityRepository
      * @param string $sort
      * @param string $order
      *
-     * @return ArrayCollection
+     * @return array
      */
     public function findEntries($userId, $isArchived = null, $isStarred = null, $isDeleted = null, $sort = 'created', $order = 'ASC')
     {
         $qb = $this->createQueryBuilder('e')
-            ->leftJoin('e.user', 'u')
-            ->where('u.id =:userId')->setParameter('userId', $userId);
+            ->where('e.user =:userId')->setParameter('userId', $userId);
 
         if (null !== $isArchived) {
             $qb->andWhere('e.isArchived =:isArchived')->setParameter('isArchived', (bool) $isArchived);
@@ -126,6 +124,6 @@ class EntryRepository extends EntityRepository
 
         return $qb
             ->getQuery()
-            ->getResult(Query::HYDRATE_ARRAY);
+            ->getResult();
     }
 }