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