I'm just getting started with Symfony2, currently trying to generate Doctrine entities from an existing database. I'm following the official tutorial on the topic, however, I'd like to have my entities generated in a different namespace other than the default (MyVendor\MyBundle\Model\Entity
instead of MyVendor\MyBundle\Entity
).
I've edited the config.yml
file like this:
doctrine:
orm:
entity_managers:
default:
mappings:
MyBundle:
prefix: MyVendor\MyBundle\Model\Entity
dir: Model/Entity
Unfortunately, I can't get this to work, as entities are still generated in the default namespace and directory. What am I doing wrong?