MongoDB not okForStorage error
MongoDB not okForStorage error
关于这个错误,我已经看了很多,似乎Mongo不会接受更新中的.
或$
,但我仍然收到此错误
{ [MongoError: not okForStorage]
name: 'MongoError',
err: 'not okForStorage',
code: 12527,
n: 0,
connectionId: 18,
ok: 1 }
这是我正在更新的对象:
{
status: "open",
type: "item",
parentId: "4fa13ba2d327ca052d000003",
_id: "4fa13bd6d327ca052d000012",
properties: {
titleInfo: [
{ title: "some item" }
]
}
}
我正在将其更新为:
{
fedoraId: 'aFedoraLib:438',
status: "closed",
type: "item",
parentId: "4fa13ba2d327ca052d000003",
_id: "4fa13bd6d327ca052d000012",
properties: {
titleInfo: [
{ title: "some item" }
]
}
}
我刚刚遇到的另一个可能的原因:存储一个在字符串键中具有句点的对象。
因此,对于遇到相同错误的人来说:这是因为我包含了蒙戈显然不喜欢的_id
我在尝试使用此键值对保存 JSON 结构(直接来自 AngularJS 应用程序)时遇到了此错误:
"$$hashKey":"021"
仅删除该键即可解决问题。对于其他使用Angular的人来说,调用Angular的内置angular.toJson
客户端似乎消除了$hashkey美元的密钥。从他们的论坛:
$scope.ngObjFixHack = function(ngObj) {
var output;
output = angular.toJson(ngObj);
output = angular.fromJson(output);
return output;
}
相关文章:
- jQuery Error adadvisor.net
- Ajax调用ERror Cross Origin REquest:在rails中自动完成大学列表
- 类型error primeFactors.for不是函数
- Array.every返回false,而不是类型error
- datatables.net ajax error - http://datatables.net/tn/7
- Error: timers.js:234 callback.apply(timer, args);
- 滚动到错误字段ERROR
- Error with xmlhttpresponse
- ajax javascript 500 error
- 将数据从ExpressJS发送到AngularJS ERROR json
- walkscore API JSON error
- STRIPE.JS Error
- Angular Routing Pretty URL Error
- 节点回调参数无法断言instanceof Error
- Jasmine .calls.count and .calls.any throwing error
- React.render error
- 如何访问npm模块抛出的自定义错误对象[error:[object object]]
- grunt contrib jshint-error在定义之前就已经使用过了
- Javascript getElementById null error
- MongoDB not okForStorage error