[Flow] Update Domain object which has value objects as its property
Rocky
rockysynergy at gmail.com
Thu Oct 9 05:53:59 CEST 2014
Hi,
The AbstractApplication has many expenses. Expense is value object. Thus I have below annotation:
/**
* @var \Doctrine\Common\Collections\Collection<\Hwwcn\Sponsor\Domain\Model\Expense>
* @ORM\ManyToMany(targetEntity="\Hwwcn\Sponsor\Domain\Model\Expense")
*/
protected $expenses;
When I try to edit an Application, I got error saying: An exception occurred while executing 'INSERT INTO hwwcn_sponsor_domain_model_abstractapplication_expenses_join (sponsor_abstractapplication, hwwcn_model_expense) VALUES (?, ?)' with params ["b035cc35-ee1a-d812-dee8-f3d974fee4ce", "393834dac2c6652171b4cc790fdb8fc961d01d9d"]:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'b035cc35-ee1a-d812-dee8-f3d974fee4ce-393834dac2c6652171b4cc790fd' for key 'PRIMARY'
Any idea how can I solve this problem please?
More information about the Flow
mailing list