Skip to content
Snippets Groups Projects
Commit 7f2efdb0 authored by Jonathan Foucher's avatar Jonathan Foucher
Browse files

delete notification_user when user or notificaiton is deleted. Fixes...

delete notification_user when user or notificaiton is deleted. Fixes #997
parent 42ae8355
No related branches found
No related tags found
No related merge requests found
Pipeline #90800 passed
......@@ -53,14 +53,14 @@ class NotificationUser
/**
* @ORM\ManyToOne(targetEntity="App\Domain\Notification\Model\Notification", inversedBy="notificationUsers")
*
* @ORM\JoinColumn(name="notification_id", referencedColumnName="id")
* @ORM\JoinColumn(name="notification_id", referencedColumnName="id", onDelete="CASCADE")
*/
private Notification $notification;
/**
* @ORM\ManyToOne(targetEntity="App\Domain\User\Model\User", inversedBy="notifications")
*
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true)
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
*/
private ?User $user;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment