X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/1c376852cd0277866cbb7345ea00993f0b37ad76..2de9e441eb89a3d4d8fa4384b2092c94519fcaea:/Entity/Dance.php diff --git a/Entity/Dance.php b/Entity/Dance.php index dccee33..59896cd 100644 --- a/Entity/Dance.php +++ b/Entity/Dance.php @@ -209,6 +209,9 @@ class Dance { * @return Dance */ public function addUser(User $user): Dance { + //Add from owning side + $user->addSubscriber($this); + $this->users[] = $user; return $this; @@ -222,6 +225,9 @@ class Dance { * @return bool */ public function removeUser(User $user): bool { + //Remove from owning side + $user->removeSubscriber($this); + return $this->users->removeElement($user); }