Fix Newsletter/SendingQueue association mapping

[MAILPOET-2428]
This commit is contained in:
Rostislav Wolny
2019-10-03 10:48:43 +02:00
committed by Jack Kitterhing
parent 42fae048d8
commit bf3adf6ef7
2 changed files with 8 additions and 7 deletions

View File

@ -130,14 +130,15 @@ class NewsletterEntity {
private $options;
/**
* @OneToOne(targetEntity="MailPoet\Entities\SendingQueueEntity", mappedBy="newsletter")
* @var SendingQueueEntity|null
* @OneToMany(targetEntity="MailPoet\Entities\SendingQueueEntity", mappedBy="newsletter")
* @var SendingQueueEntity[]|Collection
*/
private $queue;
private $queues;
function __construct() {
$this->newsletter_segments = new ArrayCollection();
$this->options = new ArrayCollection();
$this->queues = new ArrayCollection();
}
/**
@ -344,10 +345,10 @@ class NewsletterEntity {
}
/**
* @return SendingQueueEntity|null
* @return SendingQueueEntity[]|Collection
*/
function getQueue() {
return $this->queue;
function getQueues() {
return $this->queues;
}
/**

View File

@ -73,7 +73,7 @@ class SendingQueueEntity {
private $task;
/**
* @OneToOne(targetEntity="MailPoet\Entities\NewsletterEntity", inversedBy="sending_queue")
* @ManyToOne(targetEntity="MailPoet\Entities\NewsletterEntity", inversedBy="queues")
* @var NewsletterEntity
*/
private $newsletter;