I find no doc for the sort modifier. The only insight is in the unit tests: spec.lib.query.js#L12 writer.limit(5).sort(['test', 1]).group('name') But it doesn’t work for me: Post.find().sort(...
  • May 29, 2022
  • 0 Comments
I wanted to use the mongodb database, but I noticed that there are two different databases with either their own website and installation methods: mongodb and mongoose. So I...
  • May 26, 2022
  • 0 Comments
I have a node.js application that pulls some data and sticks it into an object, like this: var results = new Object(); User.findOne(query, function(err, u) { results.userId = u._id;...
  • May 19, 2022
  • 0 Comments
Basically I have a mongodb collection called ‘people’ whose schema is as follows: people: { name: String, friends: [{firstName: String, lastName: String}] } Now, I have a very basic...
  • May 18, 2022
  • 0 Comments