Use orphan removal for scheduled task subscriber entity
It is a connecting entity between task and subscriber, and it makes no sense to keep without either of them. This could prevent some partial-delete bugs. [MAILPOET-4375]
This commit is contained in:
@@ -45,13 +45,13 @@ class ScheduledTaskSubscriberEntity {
|
||||
private $error;
|
||||
|
||||
/**
|
||||
* @ORM\Id @ORM\ManyToOne(targetEntity="MailPoet\Entities\ScheduledTaskEntity")
|
||||
* @ORM\Id @ORM\ManyToOne(targetEntity="MailPoet\Entities\ScheduledTaskEntity", inversedBy="scheduledTaskSubscribers")
|
||||
* @var ScheduledTaskEntity|null
|
||||
*/
|
||||
private $task;
|
||||
|
||||
/**
|
||||
* @ORM\Id @ORM\ManyToOne(targetEntity="MailPoet\Entities\SubscriberEntity")
|
||||
* @ORM\Id @ORM\ManyToOne(targetEntity="MailPoet\Entities\SubscriberEntity", inversedBy="scheduledTaskSubscribers")
|
||||
* @var SubscriberEntity|null
|
||||
*/
|
||||
private $subscriber;
|
||||
|
Reference in New Issue
Block a user