How to add reference model
bhaireshm opened this issue · 1 comments
bhaireshm commented
How to generate the below case??
If i want to add reference to a column for eaxmple:
User = {
name: String,
email: String,
address: {
type : mongoose.Type.ObjectId,
ref: "Address"
}
}
kasumo-spec commented
U use
address: { type : Schema.ObjectId, ref: "Address" }