Node JS with Mongoose
Node with Mongoose ORM
One to One
One to Many
Many to Many
Mongo DB Relationships
one to one
// Identifier
{
_id: "12345xyz",
client: "BKD2019",
customer: {
_id: "cus123", // Identifier[customer_id]
customerName: "bezkoder",
location: 29,
country: "IN"
}
}
// client
{
_id: "12345xyz",
client: "BKD2019",
customer_id: "cus123",
}
// Customer
{
_id: "cus123",
name: "bezkoder",
location: 29,
country: "male"
}
Questions?
https://github.com/tkssharma/blog
Baseline Repo for Nest and Type ORM
Thank You