Anonymous Anonymous - 1 year ago
557 0

To add a property in an entity that is used in a form, but you do not want any doctrine mapping, use the mapping => false option.


Symfony2 Doctrine2 add entity property in form without doctrine mapping

                'mapped' => false,
                'required' => true,
                'choices' => array(
                    'M' => 'Dhr.',
                    'F' => 'Mevr.'
                'label' => 'Dhr. / Mevr.'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download