Top "Mongoose" questions

Mongoose is a MongoDB object modeling tool, or ODM (Object Document Mapper), written in JavaScript and designed to work in an asynchronous environment.

Delete a key from a MongoDB document using Mongoose

I'm using the Mongoose Library for accessing MongoDB with node.js Is there a way to remove a key from …

mongodb node.js mongoose document-database
How do I query for distinct values in Mongoose?

I have a problem where I want to be able to get all the unique cities for a collection, and …

mongodb node.js mongoose
Mongoose Schema hasn't been registered for model

I'm learning the mean stack and when I try to start the server using npm start I get an exception …

node.js mongodb mongoose
Mongoose populate with array of objects containing ref

I have a Mongoose schema with an array lists of objects that consist of a reference to another collection and …

mongoose
Mongoose - Create document if not exists, otherwise, update- return document in either case

I'm looking for a way to refactor part of my code to be shorter and simpler, but I don't know …

javascript node.js mongoose refactoring
passport.js passport.initialize() middleware not in use

I am using node with express + mongoose and trying to use passport.js with restful api. I keep getting this …

node.js express mongoose restful-authentication passport.js
Mongoose findByIdAndUpdate not returning correct model

I have an issue I've not seen before with the Mongoose findByIdAndUpdate not returning the correct model in the callback. …

node.js mongodb mongoose
Mongoose document references with a one-to-many relationship

I'm working on designing a database structure for a new project, and I'm pretty new to MongoDB, and obviously Mongoose. …

node.js mongodb mongoose mongodb-query mongoose-schema
Can't find documents searching by ObjectId using Mongoose

Campaign.find {client_id:req.param('client_id')}, (error, campaigns) -> if error response = error: error.message else for …

mongodb node.js mongoose
Stop Mongoose from creating _id property for sub-document array items

If you have subdocument arrays, Mongoose automatically creates ids for each one. Example: { _id: "mainId" subDocArray: [ { _id: "unwantedId", field: "value" }, { _…

node.js mongodb mongoose subdocument