sonata-project/SonataMediaBundle — pull request #188 by Mihailoff (2012-08-28 16:30:06+00:00)
Title: Proxy Doctrine MongoDB ODM event calls to provider in MediaManager

I haven't any experience with SonataMediaBundle, but after switch from Doctrine ORM to Doctrine MongoDB ODM, files stopped to write into filesystem. So after some research i found that prePersist/postPersist/etc methods in Provider was not called. In the MediaManager I added a class ProviderSubscriber witch listening to appropriate Doctrine MongoDB ODM events http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/events.html.

Now works fine. Maybe there is better solution in implementation. Please suggest if any.