Closed
Description
Example code to reproduce:
class User
{
}
class UserType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'cityTitle',
'text',
array(
'mapped' => false,
)
)
->add(
'city',
'entity_id',
array(
'mapped' => false, // will work ok when true
'class' => 'MetalTerritorialBundle:City',
)
);
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(
array(
'data_class' => 'Metal\UsersBundle\Entity\User',
'error_mapping' => array(
'city' => 'cityTitle',
),
)
);
}
}