I have a problem in implementing a logic, please provide some ways to solve this problem.
i have a schema named sales and a schema named development. In Sales schema there is a field for development:
development: { type: mongoose.Schema.ObjectId, ref: "Development" },
i am also populating this development field when getting all sales.
But now the client is asking that he can also add “other”(as a string) in order to differentiate that the sales is from other development which is not on our site.
So i am unable to make logic because i want to also populate developments when i will find all sales or any sale details.
please suggest me some way to implement this logic.