-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
Description
Issue type:
[x ] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ x] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[ ] latest
[ ] @next
[ x] ^0.2.28 (or put your version here)
Steps to reproduce or a small repository showing the problem:
This happens when I create a new connection, fill in the options including database as key.
const database = "tsbot";
const connectionManager: ConnectionManager = new ConnectionManager();
connectionManager.create({
type: "mongodb",
database: database, // returns "tsbots", gets ignored when you insert a document
name: database,
url: "mongo://user:pass@ip:port",
useUnifiedTopology: true,
useNewUrlParser: true,
entities: [
Warns
]
});
export default connectionManager;The key database gets ignored when I insert a document. A new database test is created automatically instead. I tried using the URL mongodb://user:pass@ip:port/database, but that is returning Authentication Failed error, leaving that away in the URL establishes a fine connection.
Reactions are currently unavailable