Questions tagged [Mongoose] (359)

2
answers

Why Mongoose kills the connection pool?

Hello! Faced such problem: at an unpredictable point process Node.js when a request to search our database using mongoose crashes with the error MongoError: pool destroyed at Pool.write (/usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/core/connection/pool.js:853:8) at _command (/usr/src/app/node_modules/mongo...
wayne80 asked April 8th 20 at 01:55
1
answer

How to build a url query to pull data with multiple values in mongoose?

There is a set query: { category: 'motherboard', 'details.socket': 'lga1151v2', 'details.chipsets': 'z370,z390' } Everything works except the last one. How to pull data from multiple value for one filed? In my case, details: { chipsets: [] } this array in the database. The code of router: app.get('/products/', async (...
Myrl asked April 7th 20 at 16:41
2
answers

How to update data in mongodb using angular 8?

Is the UserService which stores all the data. Need clicking the button to push certain data into the database. For example, in the data.friends add different id. How to do it? A few hours sitting on it, and could not solve it.
Maurine72 asked April 7th 20 at 16:35
0
answer

How to build a schema with nested attributes?

Hello. There is a catalog of products and the product model in particular, the need for her to make a scheme, while they did so, but not like that there is no validation for the fields the internal details, they cost to add? they just may be about 100 because a lot of goods and set these attributes quite different. How it...
vivian_Jacobson73 asked April 7th 20 at 15:16
2
answers

Auto-increment in MongoDB is it possible?

Colleagues how to add a autoincrement field in mongo? (serial number) I'm using mongoose/
gilberto_Russel asked April 7th 20 at 11:47
3
answers

How to disable _id in mongo collections?

Good day! Do anything to disable the _id in Mongo collections, how to do it? (as a connector to Mongo I use mongoose)
efrain_Bechtelar asked April 7th 20 at 11:42
1
answer

To return all fields from Mongo?

I need to obtain from the database a list of users, but to return to the front of data without need of password fields and some others. In mongoose how to write the query with the exception of the fields?
tara_Reiche asked April 7th 20 at 11:08
0
answer

How to write to mongodb big files using streams?

I have a client in the form of the flow comes relatively large .csv file (500MB). I need to do that using streams to write data to DB. But my experience with threads is limited only by reading and writing files. Here's what I've written, on small files it works, but if you throw the RAM reaches 500MB, 2.5 GB and of course c...
Beth_Kohler10 asked April 7th 20 at 09:47
1
answer

Express + express-handlebars output certain data from the database on every page?

Friends, sorry maybe this question will sound stupid! I have partilas footer.hbs and head.hbs in these templates from the database mongodb, I want to add microdata data stored in the collection of microdata for example , the data shared must be displayed on each page. I know one way to pass data with each request. But per...
Shemar.Cole88 asked April 7th 20 at 09:23
1
answer

How to put a React app with Mongodb in a network?

I have created a React app using Mongodb and want to spread the network. Let's say you bought a domain Mycreatedreactapp.com. As I understand it next you need to choose a hosting. What advise and how you would have to configure the DB? Thank you in advance!
Abner96 asked April 7th 20 at 09:07