[Flow] one to many > no reference to the parent object

Axel Wüstemann awu at qbus.de
Wed Nov 6 15:07:42 CET 2013


Hi there,

I have two models, related as one to many.

When I submit the form form, I have all data of the parent object as 
well as all my children. But within the children, the backward reference 
to the parent remains empty.

It would be great, if somedy could give me a hint, how to solve this. 
I'm a bit in trouble with ma project, because I cant'n bring it forweard 
wihout a solution to that ;=)

class DepositInspection (Parent)
{
...
/**
  * @var 
\Doctrine\Common\Collections\Collection<\XXX\Intranet\FisheryInspection\Domain\Model\Deposit>
  * @ORM\OneToMany(mappedBy="depositInspection", cascade={"persist"})
  */
protected $deposits;

...
}

class Deposit (Child)
{
...
/**
  * @var XXX\Intranet\FisheryInspection\Domain\Model\DepositInspection
  * @ORM\ManyToOne(inversedBy="deposits")
  * @ORM\JoinColumn(name="ANLANDEKTR_ID", referencedColumnName="ID")
  */
protected $depositInspection;
...
}

the form:
http://pastebin.com/55MwmvYc

Thank you
Axel


More information about the Flow mailing list