This commit is contained in:
2024-12-24 17:29:46 +01:00
parent 4c08435bd8
commit 9a2e4755e1
5 changed files with 15 additions and 15 deletions

View File

@ -44,7 +44,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
private ?string $email = null;
#[ORM\ManyToMany(targetEntity: Company::class, inversedBy: 'users')]
private Collection $companys;
private ?Collection $companys;
#[ORM\ManyToOne()]
#[ORM\JoinColumn(nullable: true)]
@ -157,7 +157,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
/**
* @return Collection<int, Company>
*/
public function getCompanys(): Collection
public function getCompanys(): ?Collection
{
return $this->companys;
}