I installed Sonata Admin and after install Sonata Media
i have class admin for "colors" and set in configureFormFields
->add('image', 'sonata_media_type', array('required' => false,
'context' => 'default',
'label' => 'Image',
'provider'=>'sonata.media.provider.image'
))
While stored in the database but when edit show this error
The form's view data is expected to be an instance of class Application\Sonata\MediaBundle\Entity\Media, but is a(n) string. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms a(n) string to an instance of Application\Sonata\MediaBundle\Entity\Media.
Help me, please.