From 84985081fef26bf12560d06cb3e965abb3afd2a5 Mon Sep 17 00:00:00 2001 From: Allavena Romain Date: Fri, 18 Apr 2025 10:29:10 +0200 Subject: [PATCH] =?UTF-8?q?Modification=20du=20type=20d'h=C3=A9ritage=20po?= =?UTF-8?q?ur=20r=C3=A9gler=20un=20probleme=20de=20login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Entity/Intern.php | 16 ---------------- src/Entity/UserApp.php | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/Entity/Intern.php b/src/Entity/Intern.php index ef9d347..0aee08c 100644 --- a/src/Entity/Intern.php +++ b/src/Entity/Intern.php @@ -192,22 +192,6 @@ class Intern extends UserApp } } - return $this; - } - #[ORM\ManyToOne(targetEntity: Company::class)] - #[ORM\JoinColumn(nullable: false)] - private ?Company $company = null; - - // Getter et setter pour la société - public function getCompany(): ?Company - { - return $this->company; - } - - public function setCompany(?Company $company): self - { - $this->company = $company; - return $this; } } diff --git a/src/Entity/UserApp.php b/src/Entity/UserApp.php index 4e0fb7e..0b82583 100644 --- a/src/Entity/UserApp.php +++ b/src/Entity/UserApp.php @@ -10,7 +10,7 @@ use Symfony\Component\Security\Core\User\UserInterface; #[ORM\Entity(repositoryClass: UserRepository::class)] #[ORM\Table(name: 'userApp')] -#[ORM\InheritanceType('JOINED')] +#[ORM\InheritanceType('SINGLE_TABLE')] #[ORM\DiscriminatorColumn(name: 'DISCRIMINATOR', type: 'string')] #[ORM\DiscriminatorMap(['employee' => Employee::class, 'intern' => Intern::class])] #[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_NICKNAME', fields: ['nickname'])]