Relative Content

Tag Archive for node.jsexpressmongoose

Aggregate vs Populate methods when to use one in nodejs Mongose

I am creating asset managment tool for warehouse and I have Warehouse , Asset, Category models. I want to get the overall stats of each warehouse like , total assets and how many of them is active or in-store, so that I used aggregate but It seams to me more time consuming .

Join collection through UUID using mongoose

My project developed in express js. I am facing a problem since long time. I want to join 2 collections by user_id (from products ) and _id (from users). Please note that _id is UUID. It works for others field . But when I try to make relation with _id it returns empty array.

remove _id inside schema mongoose

If there is an external schema and not an internal schema, can I delete the ID of this schema? Any plan without an ID, is that possible?
I need to remove from the schema and not save in database
#mongoose
#express