I am currently working on an application which is built using ZF 1.11.3 - Doctrine2 is the ORM component used. I need to use multiple databases. Within the application.ini file, I have set the database connections as follows:
resources.doctrine.dbal.connections.default.parameters.dbname = "db_name_one"
resources.doctrine.dbal.connections.secondary.parameters.dbname = "db_name_two"
How would I associate the Doctrine2 entity classes based on the second database connection with that connection: For example, if I have an entity class from the second connection as:
/*
* @Entity
* @Table(name="tableOnSecondDatabase")
*/
Class EntityFromSecond
{
How will Doctrine2/ZF know what entity classes are mapped to a database? Thanks for helping.