From d672a29dda5c74d3918b128041c3a02ba0305eae Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 21 May 2021 16:34:42 +0200 Subject: [PATCH 1/4] Remove obsolete documentation, fix typing here and there. --- .../AccompanyingPeriod/CommentRepository.php | 6 -- .../AccompanyingPeriod/OriginRepository.php | 6 -- ...ompanyingPeriodParticipationRepository.php | 6 -- .../AccompanyingPeriodRepository.php | 6 -- .../Household/HouseholdMembersRepository.php | 35 ----------- .../Household/HouseholdRepository.php | 35 ----------- .../Repository/PersonAltNameRepository.php | 6 -- .../PersonNotDuplicateRepository.php | 13 +--- .../Repository/PersonRepository.php | 63 +++++++------------ .../SocialWork/EvaluationRepository.php | 6 -- .../Repository/SocialWork/GoalRepository.php | 6 -- .../SocialWork/ResultRepository.php | 6 -- .../SocialWork/SocialActionRepository.php | 6 -- .../SocialWork/SocialIssueRepository.php | 6 -- 14 files changed, 25 insertions(+), 181 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/CommentRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/CommentRepository.php index aca7a9c68..b3a20780e 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/CommentRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/CommentRepository.php @@ -26,12 +26,6 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod\Comment; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method Comment|null find($id, $lockMode = null, $lockVersion = null) - * @method Comment|null findOneBy(array $criteria, array $orderBy = null) - * @method Comment[] findAll() - * @method Comment[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class CommentRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/OriginRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/OriginRepository.php index c2851b851..596bfc2ee 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/OriginRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/OriginRepository.php @@ -26,12 +26,6 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod\Origin; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method Origin|null find($id, $lockMode = null, $lockVersion = null) - * @method Origin|null findOneBy(array $criteria, array $orderBy = null) - * @method Origin[] findAll() - * @method Origin[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class OriginRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodParticipationRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodParticipationRepository.php index 0f157ed42..f902c7cc8 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodParticipationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodParticipationRepository.php @@ -26,12 +26,6 @@ use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method AccompanyingPeriodParticipation|null find($id, $lockMode = null, $lockVersion = null) - * @method AccompanyingPeriodParticipation|null findOneBy(array $criteria, array $orderBy = null) - * @method AccompanyingPeriodParticipation[] findAll() - * @method AccompanyingPeriodParticipation[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class AccompanyingPeriodParticipationRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php index 07aa0a55f..c2a8299fc 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php @@ -26,12 +26,6 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method AccompanyingPeriod|null find($id, $lockMode = null, $lockVersion = null) - * @method AccompanyingPeriod|null findOneBy(array $criteria, array $orderBy = null) - * @method AccompanyingPeriod[] findAll() - * @method AccompanyingPeriod[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class AccompanyingPeriodRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdMembersRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdMembersRepository.php index b11d3d93a..1a634f451 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdMembersRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdMembersRepository.php @@ -6,12 +6,6 @@ use Chill\PersonBundle\Entity\Household\HouseholdMembers; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method HouseholdMembers|null find($id, $lockMode = null, $lockVersion = null) - * @method HouseholdMembers|null findOneBy(array $criteria, array $orderBy = null) - * @method HouseholdMembers[] findAll() - * @method HouseholdMembers[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class HouseholdMembersRepository { private EntityRepository $repository; @@ -20,33 +14,4 @@ final class HouseholdMembersRepository { $this->repository = $entityManager->getRepository(HouseholdMembers::class); } - - // /** - // * @return HouseholdMembers[] Returns an array of HouseholdMembers objects - // */ - /* - public function findByExampleField($value) - { - return $this->createQueryBuilder('h') - ->andWhere('h.exampleField = :val') - ->setParameter('val', $value) - ->orderBy('h.id', 'ASC') - ->setMaxResults(10) - ->getQuery() - ->getResult() - ; - } - */ - - /* - public function findOneBySomeField($value): ?HouseholdMembers - { - return $this->createQueryBuilder('h') - ->andWhere('h.exampleField = :val') - ->setParameter('val', $value) - ->getQuery() - ->getOneOrNullResult() - ; - } - */ } diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php index 78a68f56d..b7a8816b3 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php @@ -6,12 +6,6 @@ use Chill\PersonBundle\Entity\Household\Household; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method Household|null find($id, $lockMode = null, $lockVersion = null) - * @method Household|null findOneBy(array $criteria, array $orderBy = null) - * @method Household[] findAll() - * @method Household[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class HouseholdRepository { private EntityRepository $repository; @@ -20,33 +14,4 @@ final class HouseholdRepository { $this->repository = $entityManager->getRepository(Household::class); } - - // /** - // * @return Household[] Returns an array of Household objects - // */ - /* - public function findByExampleField($value) - { - return $this->createQueryBuilder('h') - ->andWhere('h.exampleField = :val') - ->setParameter('val', $value) - ->orderBy('h.id', 'ASC') - ->setMaxResults(10) - ->getQuery() - ->getResult() - ; - } - */ - - /* - public function findOneBySomeField($value): ?Household - { - return $this->createQueryBuilder('h') - ->andWhere('h.exampleField = :val') - ->setParameter('val', $value) - ->getQuery() - ->getOneOrNullResult() - ; - } - */ } diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonAltNameRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonAltNameRepository.php index c5dea689a..eed330c8a 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonAltNameRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonAltNameRepository.php @@ -6,12 +6,6 @@ use Chill\PersonBundle\Entity\PersonAltName; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * PersonAltNameRepository - * - * This class was generated by the Doctrine ORM. Add your own custom - * repository methods below. - */ final class PersonAltNameRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonNotDuplicateRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonNotDuplicateRepository.php index 989baaeec..b899f06c1 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonNotDuplicateRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonNotDuplicateRepository.php @@ -7,11 +7,6 @@ use Chill\PersonBundle\Entity\PersonNotDuplicate; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * Class PersonNotDuplicateRepository - * - * @package Chill\PersonBundle\Repository - */ final class PersonNotDuplicateRepository { private EntityRepository $repository; @@ -21,12 +16,7 @@ final class PersonNotDuplicateRepository $this->repository = $entityManager->getRepository(PersonNotDuplicate::class); } - /** - * @param \Chill\PersonBundle\Entity\Person $person - * - * @return array - */ - public function findNotDuplicatePerson(Person $person) + public function findNotDuplicatePerson(Person $person): array { $qb = $this->repository->createQueryBuilder('pnd'); $qb->select('pnd') @@ -36,6 +26,7 @@ final class PersonNotDuplicateRepository $result = $qb->getQuery()->getResult(); $persons = []; + foreach ($result as $row) { if ($row->getPerson1() === $person) { $persons[] = $row->getPerson2(); diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php index 12733a668..fdd0f054e 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php @@ -32,105 +32,88 @@ final class PersonRepository $this->repository = $entityManager->getRepository(Person::class); } - public function find($id, $lockMode = null, $lockVersion = null) + public function find($id, $lockMode = null, $lockVersion = null): ?Person { return $this->repository->find($id, $lockMode, $lockVersion); } /** - * @param string $phonenumber * @param $centers * @param $firstResult * @param $maxResults - * @param array $only * @return mixed * @throws \Exception */ public function findByPhone( - string $phonenumber, - $centers, + string $phonenumber, + $centers, $firstResult, $maxResults, array $only = ['mobile', 'phone'] ) { $qb = $this->repository->createQueryBuilder('p'); $qb->select('p'); - + $this->addByCenters($qb, $centers); $this->addPhoneNumber($qb, $phonenumber, $only); - + $qb->setFirstResult($firstResult) ->setMaxResults($maxResults) ; - + return $qb->getQuery()->getResult(); } - + /** - * @param string $phonenumber * @param $centers - * @param array $only - * @return int * @throws \Doctrine\ORM\NoResultException * @throws \Doctrine\ORM\NonUniqueResultException */ public function countByPhone( - string $phonenumber, - $centers, + string $phonenumber, + $centers, array $only = ['mobile', 'phone'] - ): int - { + ): int { $qb = $this->repository->createQueryBuilder('p'); $qb->select('COUNT(p)'); - + $this->addByCenters($qb, $centers); $this->addPhoneNumber($qb, $phonenumber, $only); - + return $qb->getQuery()->getSingleScalarResult(); } - + /** - * @param QueryBuilder $qb - * @param string $phonenumber - * @param array $only * @throws \Exception */ - protected function addPhoneNumber(QueryBuilder $qb, string $phonenumber, array $only) + protected function addPhoneNumber(QueryBuilder $qb, string $phonenumber, array $only): void { if (count($only) === 0) { throw new \Exception("No array field to search"); } - + $phonenumber = $this->parsePhoneNumber($phonenumber); - + $orX = $qb->expr()->orX(); - + if (\in_array('mobile', $only)) { $orX->add($qb->expr()->like("REPLACE(p.mobilenumber, ' ', '')", ':phonenumber')); } if (\in_array('phone', $only)) { $orX->add($qb->expr()->like("REPLACE(p.phonenumber, ' ', '')", ':phonenumber')); } - + $qb->andWhere($orX); - + $qb->setParameter('phonenumber', '%'.$phonenumber.'%'); } - - /** - * @param $phonenumber - * @return string - */ - protected function parsePhoneNumber($phonenumber): string + + protected function parsePhoneNumber(string $phonenumber): string { return \str_replace(' ', '', $phonenumber); } - - /** - * @param QueryBuilder $qb - * @param array $centers - */ - protected function addByCenters(QueryBuilder $qb, array $centers) + + protected function addByCenters(QueryBuilder $qb, array $centers): void { if (count($centers) > 0) { $qb->andWhere($qb->expr()->in('p.center', ':centers')); diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php index c9ab3c931..f554e4e8c 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php @@ -6,12 +6,6 @@ use Chill\PersonBundle\Entity\SocialWork\Evaluation; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method Evaluation|null find($id, $lockMode = null, $lockVersion = null) - * @method Evaluation|null findOneBy(array $criteria, array $orderBy = null) - * @method Evaluation[] findAll() - * @method Evaluation[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class EvaluationRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php index 30576b4ed..bd7c6a738 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php @@ -6,12 +6,6 @@ use Chill\PersonBundle\Entity\SocialWork\Goal; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method Goal|null find($id, $lockMode = null, $lockVersion = null) - * @method Goal|null findOneBy(array $criteria, array $orderBy = null) - * @method Goal[] findAll() - * @method Goal[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class GoalRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php index 004a2f82c..1c4d8d013 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php @@ -6,12 +6,6 @@ use Chill\PersonBundle\Entity\SocialWork\Result; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method Result|null find($id, $lockMode = null, $lockVersion = null) - * @method Result|null findOneBy(array $criteria, array $orderBy = null) - * @method Result[] findAll() - * @method Result[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class ResultRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php index cfa9adbd7..3c86d2397 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php @@ -6,12 +6,6 @@ use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method SocialAction|null find($id, $lockMode = null, $lockVersion = null) - * @method SocialAction|null findOneBy(array $criteria, array $orderBy = null) - * @method SocialAction[] findAll() - * @method SocialAction[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class SocialActionRepository { private EntityRepository $repository; diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php index 2f6eb3ba1..1100d8136 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php @@ -7,12 +7,6 @@ use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; -/** - * @method SocialIssue|null find($id, $lockMode = null, $lockVersion = null) - * @method SocialIssue|null findOneBy(array $criteria, array $orderBy = null) - * @method SocialIssue[] findAll() - * @method SocialIssue[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ final class SocialIssueRepository { private EntityRepository $repository; From 1f4735caaca9079d249a41cc231af3ad22ab6cd7 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 21 May 2021 16:35:13 +0200 Subject: [PATCH 2/4] Fix missing ::find method. --- .../AccompanyingPeriod/ResourceRepository.php | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ResourceRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ResourceRepository.php index c32f74762..3923126aa 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ResourceRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ResourceRepository.php @@ -24,21 +24,19 @@ namespace Chill\PersonBundle\Repository\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod\Resource; use Doctrine\ORM\EntityRepository; -use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; -use Doctrine\Persistence\ManagerRegistry; +use Doctrine\ORM\EntityManagerInterface; -/** - * @method Resource|null find($id, $lockMode = null, $lockVersion = null) - * @method Resource|null findOneBy(array $criteria, array $orderBy = null) - * @method Resource[] findAll() - * @method Resource[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) - */ -final class ResourceRepository extends ServiceEntityRepository +final class ResourceRepository { private EntityRepository $repository; - public function __construct(ManagerRegistry $registry) + public function __construct(EntityManagerInterface $entityManager) { - parent::__construct($registry, Resource::class); + $this->repository = $entityManager->getRepository(Resource::class); + } + + public function find($id, $lockMode = null, $lockVersion = null): ?Resource + { + return $this->repository->find($id, $lockMode, $lockVersion); } } From 5cc5e6a1f73b8647ffe0a6b53e1844425a5b1cee Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 21 May 2021 16:35:26 +0200 Subject: [PATCH 3/4] Fix missing dependency. --- .../ClosingMotiveRepository.php | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php index c99ca8efc..5c1525b52 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php @@ -27,46 +27,41 @@ use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query\ResultSetMappingBuilder; -/** - * Class ClosingMotiveRepository - * Entity repository for closing motives - * - * @package Chill\PersonBundle\Repository - */ final class ClosingMotiveRepository { private EntityRepository $repository; + private EntityManagerInterface $entityManager; + public function __construct(EntityManagerInterface $entityManager) { + $this->entityManager = $entityManager; $this->repository = $entityManager->getRepository(ClosingMotive::class); } /** - * @param bool $onlyLeaf * @return mixed */ public function getActiveClosingMotive(bool $onlyLeaf = true) { - $rsm = new ResultSetMappingBuilder($this->repository->getEntityManager()); + $rsm = new ResultSetMappingBuilder($this->entityManager); $rsm->addRootEntityFromClassMetadata($this->repository->getClassName(), 'cm'); - $sql = "SELECT ".(string) $rsm." + $sql = "SELECT " . (string) $rsm . " FROM chill_person_accompanying_period_closingmotive AS cm WHERE active IS TRUE "; - + if ($onlyLeaf) { $sql .= "AND cm.id NOT IN ( SELECT DISTINCT parent_id FROM chill_person_accompanying_period_closingmotive WHERE parent_id IS NOT NULL )"; } - + $sql .= " ORDER BY cm.ordering ASC"; return $this - ->repository - ->getEntityManager() + ->entityManager ->createNativeQuery($sql, $rsm) ->getResult(); } From 13d5b7078e78cef387bd663fc52f4a1067ab53a9 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Wed, 26 May 2021 10:40:43 +0200 Subject: [PATCH 4/4] Prevent infinite loop and memory leak. --- .../ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php index cf796722a..a50e28621 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php @@ -32,7 +32,7 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap; use Symfony\Component\Serializer\Annotation\Groups; /** - * @ORM\Entity(repositoryClass=ResourceRepository::class) + * @ORM\Entity * @ORM\Table(name="chill_person_accompanying_period_resource") * @DiscriminatorMap(typeProperty="type", mapping={ * "accompanying_period_resource"=Resource::class