Skip to content

document_managers configuration ignores database value #199

Open
@lordnynex

Description

@lordnynex

I'm having an issue where my auth is failing because the document manager name is being used as DB name. It is not possible for me to fix this presently as I have two different document managers pointing to two different mongo clusters that share a common top level database name.

Example:
    document_managers:
        users:
            connection: users
            auto_mapping: true
            logging: true
            database: "production"
            retry_query: 3
            retry_connect: 3
    connections:
        users:
            server: "mongodb://node1:port,node2:port,node3:port"
            options:
                connect: true
                username: "example"
                password: "private"

I would expect this to connect and auth to any one of those three nodes using the database 'production'. Instead, I am seeing failed auth attempts on database 'users'. Are there any work arounds for this?

Additionally there appears to be a hard dependancy on document manager and connection being named the same. If I change the connection name to something else and reference it under the 'connection' key in the document manager configuration I receive an exception about a non-existent dependency.

General info:
Symfony 2.3.6
doctrine/mongo-odm 1.0.@dev
doctrine/mongo-odm-bundle 3.0
@dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions