Errors in new mongodb release

41 views
Skip to first unread message

José Carlos Ramalho

unread,
Dec 7, 2017, 5:47:30 AM12/7/17
to node-mongodb-native
The new driver version does not work.
When we try something like: db.collection('col')...

Method collection is not working.

We have changed to the previous version and everything runs as expected...

jcr

Andres Kalle

unread,
Jan 3, 2018, 1:20:26 PM1/3/18
to node-mongodb-native
There have been breaking changes to the API in v3.x:


Instead of getting a db object from connect(), you now get a client object instead and need to call client.db('test') to get a db object. You'll need to pass in a database name as the parameter.
Reply all
Reply to author
Forward
0 new messages