I have a problem with the SonataAdminBunle in combination with symfony 2.2. I have a Project entity and a ProjectImage entity and specified a One-to-Many relationship betwee
the simplest solution is, and naturally replace your variable names; this works for me: 'by_reference' => false
as follows:
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('name')
->add('articles', EntityType::class, array(
'class' => 'EboxoneAdminBundle:Article',
'required' => false,
'by_reference' => false,
'multiple' => true,
'expanded' => false,
))
->add('formInputs', CollectionType::class, array(
'entry_type' => FormInputType::class,
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
))
;
}