* * @method MerBeSub|null find($id, $lockMode = null, $lockVersion = null) * @method MerBeSub|null findOneBy(array $criteria, array $orderBy = null) * @method MerBeSub[] findAll() * @method MerBeSub[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class MerBeSubRepository extends ServiceEntityRepository { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, MerBeSub::class); } public function add(MerBeSub $entity, bool $flush = false): void { $this->getEntityManager()->persist($entity); if ($flush) { $this->getEntityManager()->flush(); } } public function remove(MerBeSub $entity, bool $flush = false): void { $this->getEntityManager()->remove($entity); if ($flush) { $this->getEntityManager()->flush(); } } // /** // * @return MerBeSub[] Returns an array of MerBeSub objects // */ // public function findByExampleField($value): array // { // return $this->createQueryBuilder('m') // ->andWhere('m.exampleField = :val') // ->setParameter('val', $value) // ->orderBy('m.id', 'ASC') // ->setMaxResults(10) // ->getQuery() // ->getResult() // ; // } public function findOne(): ?MerBeSub { return $this->createQueryBuilder('m') ->orderBy('m.id', 'ASC') ->setMaxResults(1) ->getQuery() ->getOneOrNullResult() ; } }