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