I'm converting a Symfony 2 project from Propel to Doctrine and wish to convert the existing database into Doctrine Entities.
To do this I'm following the tutorial on the Symfony website, however when I run the following command:
php app/console doctrine:mapping:convert xml ./src/Acme/BlogBundle/Resources/config/doctrine/metadata/orm --from-database --force
I immediately receive the following error:
[InvalidArumentException]
Doctrine ORM Manager named "" does not exist.
Can anyone explain where I'm going wrong and how I go about fixing this?
Finally found out what was causing the error. It appears that the doctrine configuration settings within config.yml require a parameter called auto_mapping: true
.
For example:
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
orm:
auto_mapping: true
More information can be found here: http://symfony.com/doc/2.0/reference/configuration/doctrine.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With