I filed an issue ticket with symfony on github, but I need a workaround: https://github.com/symfony/symfony/issues/5150
I created an entity with an associated image, and I’m saving it using a lifecycle callback as described in the symfony docs: http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html#using-lifecycle-callbacks
When A user filled out the form, and hits save, everything works fine. However, if the only item the user fills/edits is the image, then the form is not saved. I believe this is because symfony doesn’t see a change to the entity, so it doesn’t bother to repersist the entity, and thus the pre/post persist functions are never called.
I need some way to force the entity to persist.
You can add a updated Date field. At the setter of your file line set this updated field to the current date. Now everything should work fine.