3 namespace Wallabag\ApiBundle\Repository
;
5 use Doctrine\ORM\EntityRepository
;
7 class ClientRepository
extends EntityRepository
9 public function findOneBy(array $criteria, array $orderBy = null)
11 if (!empty($criteria['id'])) {
12 // cast client id to be an integer to avoid postgres error:
13 // "invalid input syntax for integer"
14 $criteria['id'] = (int) $criteria['id'];
17 return parent
::findOneBy($criteria, $orderBy);