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