[Flow] identifier gets lost in form

Winfried Mingst admin at regionalberatung.at
Fri Jun 28 16:12:46 CEST 2013


Hi Flowx,

I try to edit properties of two models in one form desperately.
There is a "master" and "detail" model/entity (1:1 unidirectional 
relation, "detail" holds foreign key @ORM OneToOne( 
cascade={"persist","remove"}))

Source code of edit form shows identifiers of both models initialy:

<input type="hidden" name="detail[__identity]" value="20390230..." />
<input type="hidden" name="detail[master][__identity]" value="91a3aa0..." />


BUT if the form is reloaded in case of a validation error, the 2nd 
hidden field gets lost!
The result is a duplicate dataset in table master when the form is 
resubmitted.

here is my Controller
https://github.com/regioadmin/WL.Test/blob/master/Classes/WL/Test/Controller/DetailController.php
here is my edit form
https://github.com/regioadmin/WL.Test/blob/master/Resources/Private/Templates/Detail/Edit.html


What's wrong?  Do I need some additional subPropertyMapping config?

thx

Winfried


More information about the Flow mailing list