doctrine / doctrine/DoctrineMongoDBBundle

document_managers configuration ignores database value

Open
#199 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
384
Forks
228
PR merge metrics
No merged PRs in 30d

Description

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.

``` YAML
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.