Bug #52509

Child-Object's Identifier get's lost on Form-Submission with Validation Error

Added by Mario Rimann almost 2 years ago. Updated almost 2 years ago.

Status:New Start date:2013-10-03
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:-
Affected Flow version:Flow 2.0.0

Description

Given the situation with the following Domain Model:

  • Registration (the parent-object)
    • has property "patientData" to store an object of the type "PatientData" (the child-object)
    • has other properties of different types, some Strings, some other child-objects
In the first step of the form
  1. the Registration object is instantiated
  2. the PatientData object is instantiated and attached with $registration->setPatientData($patientData)
  3. the registration is added to the RegistrationRepository
  4. everything is explicitely persisted with a call to persistAll()

Then the second step of the form is displayed and contains some hidden fields with the Identity of the child-object. The UUID is the one I can also see directly in the database. So far everything is OK.

Now the second step of the form is submitted while missing out one of the mandatory fields to trigger a validation error.

The form of the second step is now shown again - but the hidden fields in the form header (generated by fluid) are not the same anymore -> the identifier for the child-object is missing! It looks like they get stripped off somehow.

Tested on Flow 2.0.0 and Fluid 2.0.0

Also available in: Atom PDF