php - Symfony2, Doctrine: Configuring repositories for multiple databases -


let's have lot (50+) of repository configurations begin this

// in src/foo/barbundle/resources/config/doctrine/baz.orm.yml foo\barbundle\entity\baz:   type: entity   repositoryclass: foo\barbundle\entity\bazrepository   table: foo.bar.baz 

i working more 1 database, clones of each other

// in app/config/config.yml doctrine:   dbal:     default_connection: default     connections:       default:         dbname:   foo       alpha:         dbname:   alpha       bravo:         dbname:   bravo       charlie:         dbname:   charlie 

is there way me change way repository configuration handles table name dinamically ? tried inject app parameters in them, didn't quite worked.

// in app/config/parameters.yml parameters:   database_active:   charlie  // in src/foo/barbundle/resources/config/doctrine/baz.orm.yml foo\barbundle\entity\baz:   table: %database_active%.bar.baz 

[note] working ms sql server, think same problem applied postgresql databases


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -