Skip to content

Tag: mongodb

Why am I getting this deprecated warning?! MongoDB

I’m working with MongoDB in NodeJS, and when the last c.getUser statement is executed (that’s to say, when I make a SECOND connectio) Mongodb outputs this warning: But I’m not using any deprecated options. Any ideas? EDIT After a little discussion with molank in the comments, it looks like o…

only return document _id on mongoose .find()

I update 100’s of documents every second by pushing new data to an array in its document. To get the document of which I am going to add data to, I use the mongoose .find().limit(1) function, and return the whole document. It works fine. To help with some memory and cpu issues I have, I was wondering ho…