Is it possible to add multiple ref in a field? i have a scenario to store history of actions like, who is adding, deleting and updating. So admin and staff have the rights to add, delete and update but both are different schemas.
CreatedBy: {
type: mongoose.Schema.Types.ObjectId,
ref: ['admin', 'staff']
}
is this possible??? @vkarpov15
Most helpful comment
http://mongoosejs.com/docs/populate.html#dynamic-ref