Hi,

When creating a form class for an entity that extends a parent entity,
I think it would be logical that when you embed a form of the parent
classes type using the standard way (http://symfony.com/doc/2.0/book/
forms.html#embedding-a-single-object), it maps properly correctly to
the parent class when the form is submitted.

For example, consider two entity classes, Person and Student, with
Student extending Person, and two form classes PersonType and
StudentType. Now say in my StudentType form I wanted to be able
include the PersonType form (that would make sense right?). I would
write code like...

$builder->add('person', new PersonType());

However, when I submit the form, I'd get an exception like "the
Student entity does not have a person field". I think the mapping
class should be able to look at inherited entities in the mapping
process and handle them appropriately.

Thanks,
Steve

-- 
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 developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to