我正在尝试使用up with update同时提供查询(userId,folderId,word),但以下内容无效。
Words.update({
userId: req.session.passport.user,
folderId: req.body.folderId,
word:req.body.addword
}, {
$set:{
userId: req.session.passport.user,
folderId: req.body.folderId,
word:req.body.addword,
meaning: req.body.addmeaning,
example: req.body.addexample,
image: req.body.addimage,
NoCorrectAns: 0,
createdAt: Date()
}
},{
upsert: true
});