如何将webpack-cli
添加到多数组?还是确保required
不为空?
many
喜欢将var FooSchema = Schema({
name: {
type: String,
required: true,
unique: true
},
bars: [{type:Schema.Types.ObjectId, ref:'Bar'}]
})
添加到required
,如何将name
添加到required
?
尝试过bars
我还想添加一个bars: [{type:Schema.Types.ObjectId, ref:'Bar', required: true}]
中间件吗?正确的方法是什么?