Skip to content

Commit

Permalink
fix: add cascade remove on user for teammembership
Browse files Browse the repository at this point in the history
  • Loading branch information
Lundli committed Oct 30, 2023
1 parent 5141aa4 commit 2c1ce99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
/**
* @var TeamMembership[]
*/
#[ORM\OneToMany(mappedBy: 'user', targetEntity: TeamMembership::class)]
#[ORM\OneToMany(mappedBy: 'user', targetEntity: TeamMembership::class, cascade: ['remove'])]
private $teamMemberships;

/**
* @var ExecutiveBoardMembership[]
*/
#[ORM\OneToMany(mappedBy: 'user', targetEntity: ExecutiveBoardMembership::class)]
#[ORM\OneToMany(mappedBy: 'user', targetEntity: ExecutiveBoardMembership::class, cascade: ['remove'])]
private $executiveBoardMemberships;

#[ORM\OneToMany(mappedBy: 'user', targetEntity: CertificateRequest::class)]
Expand Down

0 comments on commit 2c1ce99

Please sign in to comment.