On Thu, 20 Jan 2011 04:40:04 -0800 (PST), Venzon <[email protected]> wrote:
> I am testing with mutiple db connections, my config.yml looks like
> this:
> 
> doctrine.orm:
>     auto_generate_proxy_classes: %kernel.debug%
>     auto_generate_hydrator_classes: true
>     auto_generate_proxy_classes: true
>     proxy_namespace: Proxies
>     proxy_dir: %kernel.cache_dir%/doctrine/orm/Proxies
>     default_entity_manager: default
>     default_connection: default
>     metadata_cache_driver: array
>     query_cache_driver: array
>     result_cache_driver: array
>     metadata_cache_driver: apc
>     cache_driver: apc
>     entity_managers:
>         default:
>             connection: default
>             mappings:
>                 HelloBundle: ~
>         conn1:
>             connection: conn1
>             mappings:
>                 HelloBundle: ~
>         conn2:
>             connection: conn2
>             mappings:
>                 HelloBundle: ~
> 
> seems that its ok because everything works fine for me beside
> retrieving custom repositories...

First of all you cannot map the same bundle with 2 different entity
managers as this will break the entity management (the entity managers will
use different UnitOfWork trying to manage the same entity which will break
the consistency of your database).

Thus you have to be sure to use the entity manager managing your entity.

-- 
Christophe | Stof

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to