Closed
Description
Symfony version(s) affected: 4.1.8, not affected until 4.1.2 (I do not know about versions in between) also 4.2.0 is not affected
I use CollectionType
in a form and it is configured with
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
When I submit the form all child entities are deleted!
The bug occurred with a OneToMany Relationship, I do not know whether ManyToMany relations are also affected or not.
Another thing that changed is that I used to type cast the parameter for the setter method of a OneToMany relation with ArrayCollection
, which also worked out in V.4.1.2 but fails in 4.1.8. The setter is getting a PersistenCollection
and throws an error. Not a big thing, but maybe that's related to the bug?