【发布时间】:2023-03-20 19:52:01
【问题描述】:
我在 Mongoose 模式中定义的对象中有以下属性,有没有办法阻止 Moongose 在 App.create() 或更新插入期间分配默认枚举值
band_collection: {
type: String,
enum: COLLECTIONS.concat('Custom')
}
// collection
COLLECTIONS = ['red', 'white', 'blue']
【问题讨论】:
标签: mongodb mongoose mongodb-query mongoose-populate