[Flow] One-To-One Bidirectional only one site available

Axel Wüstemann awu at qbus.de
Fri Jan 24 21:59:48 CET 2014


Hello,

for a business planning solution I have scheduledPayments (planned 
payments) and invoices. I have established a bidirectional one to one 
relation

/**
  * @Flow\Entity
  */
class Invoice {

...

/**
  * @var Qbus\Bestdesq\Project\Domain\Model\ScheduledPayment
  * @ORM\OneToOne(mappedBy="invoice")
  */
protected $scheduledPayment;

/**
  * @Flow\Entity
  */
class ScheduledPayment

...

/**
  * @var Qbus\Bestdesq\Project\Domain\Model\Invoice
  * @ORM\OneToOne(inversedBy="scheduledPayment")
  */
protected $invoice;



When I enter e new invoice I select one of the available 
scheduledPayments. As a result invoice->scheduledPayment is correctly 
set but the opposit scheduledPayment->invoice remains empty.

In a dashboard list I want to show all scheduledPayments which have not 
yet an invoice.

How to implement such scenario correctly?

Thanks
Axel


More information about the Flow mailing list