Hello,
I'm having some issues trying to use sfDoctrineGuardPlugin with a
symfony project that uses 2 Doctrine connections.
I use 2 connections because I have a phpBB forum embedded in my project
(using prestaForumConnectorPlugin), and I want to keep the forum and
application specific databases separate.
What I want to know, is how to specify which connection should
sfDoctrineGuardPlugin use to manage it's users, grups and permissions.
My current databases.yml reads as follows:
all:
doctrine:
class: sfDoctrineDatabase
param:
dsn:
mysql:host=localhost;dbname=mydb;unix_socket=/var/run/mysqld/mysqld.sock
username: mydb
password: *****
forum:
class: sfDoctrineDatabase
param:
dsn:
mysql:host=localhost;dbname=forum;unix_socket=/var/run/mysqld/mysqld.sock
username: forum
password: *****
and currently, sfDoctrineGuardPlugin is trying to create it's tables and
manage it's users in the forum DB, which is not what I want.
What's the best way to tell the plugin to use the doctrine connection
(instead of the forum one)?
The solutions that come to mind are:
1. Specify it in ProjectConfiguration::configureDoctrine() or
ProjectConfiguration::setupPlugins() using the Doctrine Manager;
2. Change the plugin schema.yml to add the connection property to each
model (bad and ugly, and not the preferred aproach);
3. Override some kind of plugin configuration and set it there? (how?)
What's the best way to do this?
Best Regards,
--
Tiago Nunes
--
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en.