Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 2.8.22 |
I have a strange behaviour with a form (mapped to an array
, not to a Entity) containing a field of type EntityType
with multiple=true
.
If I set that field with initial data an empty array
, e.g. array()
, after successful submit when I call $form->getData()
I get an ArrayCollection
for that field.
Instead, if I set that field with initial data a non empty array
, after a successful submit when I call $form->getData()
I get a simple array
for that field.
Shouldn't I obtain always the same type?