Skip to content

db name is always admin if url is used without db #610

Closed
@nflaig

Description

@nflaig

Steps to reproduce

  • Set url parameter in connection properties to mongodb://localhost:27017
  • Set database parameter to mydb

Current Behavior

It will use admin as database

Expected Behavior

It should use mydb as database

Additional information

In the connector it checks if the dbName is in the url (mongodb.js#L338) and if not it should use settings.database but this is does not quite work because in the url will always be a database, the mongo driver will always set admin as default in the url if no database is specified (url_parser.js#L377)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions