From 8a58af7e48b04df76b204d8e66aadfb44c97eec2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 27 Feb 2024 16:29:45 +0100 Subject: [PATCH] Fix dance user add/remove from inverse side --- Entity/Dance.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Entity/Dance.php b/Entity/Dance.php index 8d83062..796b81f 100644 --- a/Entity/Dance.php +++ b/Entity/Dance.php @@ -210,7 +210,7 @@ class Dance { */ public function addUser(User $user): Dance { //Add from owning side - $user->addSubscriber($this); + $user->addDance($this); $this->users[] = $user; @@ -225,12 +225,12 @@ class Dance { * @return bool */ public function removeUser(User $user): bool { - if (!$this->users->contains($user)) { + if (!$this->dances->contains($user)) { return true; } //Remove from owning side - $user->removeSubscriber($this); + $user->removeDance($this); return $this->users->removeElement($user); } -- 2.41.1