Fix scheduled task entity having the same association twice
It also seems that orphanRemoval doesn't play well with our explicit detachAll logic. [MAILPOET-6047]
This commit is contained in:
committed by
Rostislav Wolný
parent
55416fd2ff
commit
b18bb14ecc
@@ -95,15 +95,8 @@ class ScheduledTaskEntity {
|
|||||||
*/
|
*/
|
||||||
private $sendingQueue;
|
private $sendingQueue;
|
||||||
|
|
||||||
/**
|
|
||||||
* @ORM\OneToMany(targetEntity="MailPoet\Entities\ScheduledTaskSubscriberEntity", mappedBy="task", orphanRemoval=true)
|
|
||||||
* @var Collection<int, ScheduledTaskSubscriberEntity>
|
|
||||||
*/
|
|
||||||
private $scheduledTaskSubscribers;
|
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->subscribers = new ArrayCollection();
|
$this->subscribers = new ArrayCollection();
|
||||||
$this->scheduledTaskSubscribers = new ArrayCollection();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -45,7 +45,7 @@ class ScheduledTaskSubscriberEntity {
|
|||||||
private $error;
|
private $error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Id @ORM\ManyToOne(targetEntity="MailPoet\Entities\ScheduledTaskEntity", inversedBy="scheduledTaskSubscribers")
|
* @ORM\Id @ORM\ManyToOne(targetEntity="MailPoet\Entities\ScheduledTaskEntity", inversedBy="subscribers")
|
||||||
* @var ScheduledTaskEntity|null
|
* @var ScheduledTaskEntity|null
|
||||||
*/
|
*/
|
||||||
private $task;
|
private $task;
|
||||||
|
Reference in New Issue
Block a user