Related to this issue : https://github.com/sonata-project/SonataCoreBundle/issues/408, I have an unexpected behavior of a custom sonata_type_collection.
The collection is used as an EAV model to build dynamic forms througth a standard sonata_type_collection.
When submitting the form with an error (e.g. a mandatory field that is empty) the re-rendered form loose it's structure. The collection is built in a PRE_SET_DATA form events, but when submitting, the preSubmit event « destroy » the collection built in PRE_SET_DATA.
My question, is there a way to avoid the collection clearing at submit time ?