- Ajout de la table Favoris.

- Relation entre user et favoris en onetomany.
This commit is contained in:
2025-01-29 15:18:01 +01:00
parent 74288b17a9
commit c20f3bc933
5 changed files with 145 additions and 2 deletions

View File

@ -0,0 +1,48 @@
<?php
namespace App\Repository;
use App\Entity\Favoris;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Favoris>
*
* @method Favoris|null find($id, $lockMode = null, $lockVersion = null)
* @method Favoris|null findOneBy(array $criteria, array $orderBy = null)
* @method Favoris[] findAll()
* @method Favoris[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
*/
class FavorisRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Favoris::class);
}
// /**
// * @return Favoris[] Returns an array of Favoris objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('f')
// ->andWhere('f.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('f.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Favoris
// {
// return $this->createQueryBuilder('f')
// ->andWhere('f.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}