Missing Schema Error: Schema hasn't been registered for model "[object Object]". Use mongoose model(name, schema) at Mongoose model error occurred ne ...
Missing Schema Error: Schema hasn't been registered for model "[object Object]". Use mongoose model(name, schema) at Mongoose model error occurred ne ...
this is my code and i am getting this error Cannot overwrite emails model once compiled. after i hit to api error is as follow GET /stats/emails ...
user-controller.js const uuid = require('uuid') const bcrypt = require('bcrypt') const saltRounds = 12; const User = '../models/user' async fun ...
i am trying to return aggregation result based on user's role and active status sample doc above query result below } expecting result like, he ...
I have been working with MongoDB for just over a month, and I do not have much experience with Relational Databases as well. I would try to explain wh ...
Here I want to access the values of commet for Appling filters Here is is the output of my products I want to access my comments I tried the fol ...
I have two models User and Company. in the User I am storying the Company._ID, to associate users with a company. I have both of the models CRUD capab ...
There are currently 2 models Product and Books; where Book inherits from Product as shown below: Additionally, there is a Cart schema, which has a ...
Let's say this is the complete document I want my query to return based on recipients.code: XY231 and if the recipients.code doesn't match any elem ...
I created a database on MongoDB setting the _id (string) of the documents myself. Now when I try to find and populate I get this error: The part of ...
I am looking to push to an array on my users schema in mongoose. I am following mongoose's Adding Subdocs to Arrays documentation but keep getting an ...
I am using mongoose to store user data, and one of the attributes is items: [] in my additems.js: const User = require('../models/User'); var array = ...
I have a collection of users that has an array of multiple plates : I'm trying to figure out a way to add a new field to the all current plate obje ...
I've created a custom identifier ID and I'm trying to update my coins and aswell as the first array object purchased bool to true. this is how my dat ...
I am trying to connect to Mongodb from my first node project.I am using Mongoose to achieve that. However, mongoose.connect() gives me MongoParseError ...
My code simply is I want to let the user bookmark different types of products. This is on the user schema How can I set the refPath to look on the ...
I'm using mongoose to to define 2 schemas. employee.js and role.js The problem I have is that, whenever I insert a document with a role code th ...
I have a User model with a schema that I would like to validate an array of multiple friends by their id's. The portion of the schema that is supposed ...
I want to save the interview array object. I want when scheduled round 1 occurs and their feedback too based on round 1, want to save round 1 data wit ...
I am trying to upload a form data consisting of name, email, and pdf file and i am currently stuck at uploading part when I submit the form I get this ...