diegohaz/rest

How to add reference model

bhaireshm opened this issue · 1 comments

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"
}

}

U use

address: { type : Schema.ObjectId, ref: "Address" }