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