It should only update and return results that have match on the request data.
(它仅应更新并返回与请求数据匹配的结果。)
it should be not mutually exclusive (ie if one query does not match then do not return result results)
(它不应互斥(即,如果一个查询不匹配,则不返回结果结果))
is using implicit $and a solution to that ?
(使用隐式$和解决方案?)
Query(询问)
keystone.list('Vehicle').model.update({ $or: [{ Body: { $in: req.body.data[0].body } }, { Model: { $in: req.body.data[0].model } }, { Make: { $in: req.body.data[0].make } }, { Year: { $in: req.body.data[0].year } }] }, {
$set: {
'Summer_Sale_Event': req.body.summer_sale_value
}
}, {
'multi': true
}).exec(function (err, result) {
});
Request data(索取资料)
Request : [ { body: [ 'Convertible' ],
make: [ 'Chevrolet' ],
year: [ '2005' ],
model: [ 'Corvette' ] } ]
ask by Mr. Mark Tawin translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…