1
我收到错误消息Uncaught Error: When the modifier option is true, validation object must have at least one operator
错误:试图更新
我看similar的questions一个number时“未捕获错误当改性剂的选择是正确,验证对象必须至少有一个运营商”,但一直没能破译这有什么错我的查询:
Meteor.users.update({
_id: Meteor.user()._id
}, {
$set: {
"emails.letter": true
}
})
我的MongoDB的结构如下:
{
"_id": "ujkwQp4rYTKQeLq3F",
"emails": [{
"address": "[email protected]",
"letter": false
}]
}
我认为你将'emails'定义为一个数组,但是像'letter'这样的行为是属性。尝试取出括号,这样'emails'是一个对象。这有帮助吗? – terrafirma9
可能会有多封电子邮件,所有这些邮件都会有自己的验证,所以我无法更改模型@ terrafirma9 – maudulus