I have a problem in Symfony 2.3 specifically, where I need to generate schema and update it, access tables in 2 differents databases. Both are in MySQL. How to Work with multiple Entity Managers and Connections doesn't fix to the scenario, even it's recommended in some articles around.
Errors:
[RuntimeException]
Bundle "XyzBundle" does not contain any mapped entities.
Commands:
- doctrine:generate entities XyzBundle --no-backup
- doctrine:schema:update --force --em=payment
#/app/config/config.yml
doctrine:
#... connections (default, payment, etc.)
orm:
default_entity_manager: default
auto_generate_proxy_classes: "%kernel.debug%"
entity_managers:
default:
connection: default
mappings:
MyBundle: ~
payment:
connection: payment
mappings:
ZkPaymentBundle: ~
First, I found these excellent articles, where many configurations forms are mentioned.
Doctrine ORM
Install Gedmo Doctrine2 extensions in Symfony2
Even when the bundle isn't in 'vendor/' dir, it was necessary assume that was an external one.
#/app/config/config.yml
Commands
I hope it saves a lot of wasted time.