Day 29: Populate Method & Nested Models (MongoDB + Mongoose)
πΉ Why Do We Need populate()?
In MongoDB, collections are separate.When we use referencing, we only store an ID, not full data.
Example:
{
"passengerName": "Amit",
"train": "65fae91c2b..."
}
This ID alone is not useful for UI.
π populate() help...