I'm building a REST API with FOSRestBundle in Symfony2. I'm using forms to create and update entities with Doctrine2. Everything works fine if I send all form fields. Example:
{"first_name":"Pi","last_name":"Wi"}
The person is inserted fine but now I want to update only the last name.
{"last_name":"Wi"}
The problem is that the first name is empty after the update because the form updates the entity with an "null" value (because it isn't given). Is it possible to just update the last name and ignore the first name?