Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
49 views

While defining the model, discriminators are created on the basis of the SchemaVersion. On export, the already created discriminator model is returned to prevent the overwrite errors from mongoose ...
2 votes
0 answers
147 views

Mongoose connection to MongoDB Atlas fails with queryTxt ETIMEOUT I’m trying to connect my Node.js app to MongoDB Atlas using Mongoose, but the connection fails with a timeout error. Here’s the error ...
0 votes
0 answers
75 views

A of class="active" is added based on what star I click on. With schema, how do I connect it to the db, creating a default 1 star to every post? Tried to do it with "score:" but ...
0 votes
0 answers
44 views

I've been trying to create a plugin which implements a query and schema method that populates a user field and selects some inner fields from it (firstName, lastName, image). I just can't seem to make ...
0 votes
1 answer
79 views

I'm building a MERN stack application where users can create travel logs. I'm using Passport JWT for authentication. When a user creates a travel log, I want it to be automatically associated with ...
0 votes
0 answers
29 views

There is an existing collection1 having a property which is an id of another collection2 but the data type is string. How do I convert this property to an objectId type with reference to the other ...
0 votes
1 answer
89 views

For displaying the (daily-weekly-monthly-annual) total profits for the store's dashboard. I want to store the data in an array for each store to not have multiple docs for the same store but different ...
0 votes
0 answers
37 views

I have a collection named ‘policies’ which references control in its field 'associatedControls' from collection ‘controls’ and control has a field 'associatedFrameworks' where it references 'framework'...
0 votes
0 answers
40 views

I'm using NextJs 15 with TypeScript and Mongoose, but when I try to populate the Product fields with the category, I get the following error: Error: Schema hasn't been registered for model "...
2 votes
1 answer
115 views

I'm developing a Mongoose plugin that archives documents on every update by cloning the original schema. However, I'm facing an issue with unique fields: when a field is marked as unique, Mongoose ...
1 vote
0 answers
75 views

I'm working with a Node.js application using MongoDB and Mongoose, and I have two models: User and Address. I am trying to add an address to a user, but when I try to call findOne on the Address model,...
0 votes
0 answers
67 views

MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make ...
1 vote
0 answers
42 views

I have a mongoose Schema and I would like to rename a certain property named 'template' to 'document'. If I would first change name of the property from 'template' to 'document' in the Schema and than ...
Paul's user avatar
  • 2,574
0 votes
0 answers
36 views

Synopsis I want to rename the 'address' field to 'location' in my Mongoose schema. The location field only stores address data, such as street, city, postcode, etc. The locationGeo field, on the other ...
0 votes
1 answer
53 views

Note: I'm a beginner level person in typescript, so, instead of downvoting my question, please try to elaborate the concept. I'm having trouble using enum in my code. I want to use an enum(with values)...

15 30 50 per page
1
2 3 4 5
...
225

AltStyle によって変換されたページ (->オリジナル) /