someone gave me a hint on IRC. use 'property_path' to specify
properties which should not be mapped to the entity:

$builder->add('recipientHashes','choice',array(
                    'property_path' => false, // this is a property
which is not mapped directly to the object
                    ));

On Jun 12, 12:13 pm, Rytis Daugirdas <rytis.daugir...@gmail.com>
wrote:
> Hello,
>
> I have a form type that extends Symfony\Component\Form\AbstractType. I
> use it with an entity object. I'd like to add additional fields and
> validation constraints to the form, but calling $builder->add('extraField', 
> ...) produces an error telling that added fields
>
> don't exist in the entity (of course they don't). What is the
> recommended solution to this problem? In symfony 1.4, you could easily
> add additional fields and use their values in doUpdateObject or
> doSave.
>
> Thanks,
> Rytis

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to