I try to install the Sonata Media Bundle into the Symfony CMF following this guide: https://sonata-project.org/bundles/media/3-x/doc/reference/installation.html. This command
php app/console sonata:easy-extends:generate --dest=src SonataMediaBundle
makes a whole new bundle ApplicationSonataMediaBundle
with a few entities:
- Gallery
- GalleryHasMedia
- Media
But i get the error that the entity Category does not exist when i want to go to the next step:
app/console doctrine:schema:update --force
This is the complete error:
[Doctrine\ORM\Mapping\MappingException]
The target-entity Application\Sonata\ClassificationBundle\Entity\Category cannot be found in 'Application\Sonata\MediaBundle\Entity\Med
ia#category'.
Is there somebody who can help me to solve this?
Thanks in advance.
Update:
# sonata_classification.yml:
sonata_classification:
# ...
doctrine:
orm:
entity_managers:
default:
#metadata_cache_driver: apc
#query_cache_driver: apc
#result_cache_driver: apc
mappings:
#ApplicationSonataClassificationBundle: ~
SonataClassificationBundle: ~