0
我有以下貓鼬架構(I去除一些不必要的比特):刪除的子子陣列(所有元素)
var VoteSchema = new Schema({
voter: String,
val: {type:Number, max:1, min:-1},
voted_at: { type: Date, default: Date.now },
comments: [{type:String, trim:true}]
});
var LexicalEntrySchema = new Schema({
label:{type:String,trim:true, index:true},
images:[{
image_uri: {type:String,trim:true},
description: String,
votes:[ { type: Schema.ObjectId, ref: 'Vote'} ]
}],
});
我要刪除中的所有圖像的所有票所有詞彙條目。這怎麼能做到?
你有試過任何東西嗎?因爲你問的方式聽起來像是你想讓別人在這裏爲你解決問題,而不是你想克服一些障礙來自己做。 –