Skip to content

Commit

Permalink
fix: add cascade on user delete for team memberships
Browse files Browse the repository at this point in the history
  • Loading branch information
Lundli committed Oct 30, 2023
1 parent 2c1ce99 commit b10d06a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Core/Domain/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,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;

public function __construct()
Expand Down

0 comments on commit b10d06a

Please sign in to comment.