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

Related issues

adamreisnz picture adamreisnz  路  3Comments

gustavomanolo picture gustavomanolo  路  3Comments

CodeurSauvage picture CodeurSauvage  路  3Comments

jeneser picture jeneser  路  3Comments

ghost picture ghost  路  3Comments