Mongoose: possible for multiple 'ref'?

Created on 10 Jun 2016  路  1Comment  路  Source: Automattic/mongoose

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

>All comments

Was this page helpful?
0 / 5 - 0 ratings