Top "Mongoose-schema" questions

Everything in the Mongoose ODM starts with a Schema.

How to Create and Use Enum in Mongoose

I am trying to create and use an enum type in Mongoose. I checked it out, but I'm not getting …

node.js mongodb mongoose enums mongoose-schema
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
Nested objects in mongoose schemas

i've seen many answers to this question here, but i still don't get it (maybe because they use more "complex" …

node.js mongodb mongoose-schema
Mongoose - remove multiple documents in one function call

In documentation there's deleteMany() method Character.deleteMany({ name: /Stark/, age: { $gte: 18 } }, function (err) {}); I want to remove multiple documents that …

node.js mongodb mongoose mongoose-schema database
Find one or create with Mongoose

I have Page.findById(pageId).then(page => { const pageId = page.id; .. }); My problem is that if no page id …

javascript node.js mongodb mongoose mongoose-schema
mongoose TypeError: Schema is not a constructor

I've encountered a strange thing. I have several mongoose models - and in one of them (only in one!) I …

javascript node.js mongoose mongoose-schema
MongoDB E11000 duplicate key error

I have a model that keeps erroring out after the first POST. I'm creating a scheduling application, which is X …

mongodb express mongoose-schema
How do I perform a find query in Mongoose?

i have a collection of Ebooks data in mongodb like { "_id" : ObjectId("58b56fe19585b10cd42981d8"), "cover_path" : "D:\\…

node.js mongodb express mongoose mongoose-schema
how to create mysql schema in nodejs

I am using nodejs, express framework and mysql for my database. I would like to know how can I replicate …

mysql schema mysql-workbench mongoose-schema
How to check if MongoDB server is running in pc

I wanted to check if my MongoDB server is running. I am following a tutorial in thinkster.io about the …

node.js mongodb mongoose-schema pc