namespace Wallabag\CoreBundle\Repository;
-use Doctrine\ORM\Query;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Tools\Pagination\Paginator;
/**
* Find Entries
*
- * @param int $userId
- * @param bool $isArchived
- * @param bool $isStarred
- * @param bool $isDeleted
- * @param string $sort
- * @param string $order
+ * @param int $userId
+ * @param bool $isArchived
+ * @param bool $isStarred
+ * @param bool $isDeleted
+ * @param string $sort
+ * @param string $order
*
- * @return Entry
+ * @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);