createQueryBuilder('l') ->andWhere('l.exampleField = :val') ->setParameter('val', $value) ->orderBy('l.id', 'ASC') ->setMaxResults(10) ->getQuery() ->getResult() ; } */ /* public function findOneBySomeField($value): ?LinguisticaTradItem { return $this->createQueryBuilder('l') ->andWhere('l.exampleField = :val') ->setParameter('val', $value) ->getQuery() ->getOneOrNullResult() ; } */ public function findById($id) { $qb = $this->createQueryBuilder('l'); $qb->where('l.id = :id') ->setParameter('id', $id); return $qb; } }