猫鼬这么说很奇怪,因为我很确定我有东西。
这是我的猫鼬模型:
var Job = mongoose.model('Job', new Schema({
_creator: {
type: mongoose.Schema.Types.ObjectId,
required: true
},
companyName: {
type: String,
required: true,
trim: true
},
position: {
type: String,
required: true,
trim: true
},
isCurrent: {
type: Boolean
// required: true
},
startedDate: {
type: Date,
required: true
},
endDate: {
type: Date
},
descriptions: [{
description: {
type: String,
required: true
},
skills: [{
skillId: {
type: mongoose.Schema.Types.ObjectId,
required: true
},
skillName: {
type: String,
required: true
}
}]
}]
}));
但是它告诉我它需要路径description
,该路径已经包含在上面的作业对象中:
超级困惑。任何帮助表示赞赏!