bocketme / bocket-mvp

Other
2 stars 1 forks source link

[Database] Performance - Update the data #60

Open RePloZ opened 6 years ago

RePloZ commented 6 years ago

Objective

When we were looking to retrieve sub-documents in our database, we to make another request to catch the sub-documents. We also had to create multiple request to update the parent whe

Until today, when we were looking to retrieve sub-documents in our database, we had to make several requests to it. Thanks to the poulate () function provided by mongoose, more powerful than the native lookup () of mongoDB, we won't have to do any more: requests to update sub-documents to parents => requests to retrieve sub-documents.

Step By Step