我有这样的记录:
{
"Date" : ISODate("2013-06-28T18:30:00Z"),
"Details" : {
"Amount1" : -200,
"Amount2" : 2800,
"Amount3" : -100
},
'NID' : 'T123RT',
'PID' : 'P123RT',
"SettAmount" : 2500,
"SettStatus" : "completed",
"Status" : "completed",
"StoreID" : "51ea54279d867b040b000008",
"_id" : ObjectId("51ea54279d867b040b000013")
}
我正在尝试更新文档,例如:
db.settlements.update({
'StoreID' : "51ea54279d867b040b000008",
'Date' : ISODate("2013-06-28T18:30:00Z")
}, {
$unset : {
'NID' : "",
'PID' : ""
}
}, {
$set : {
'SettStatus' : 'start',
'Status' : 'pending'
}
});
但是,只有 unset 操作是成功的。上述查询中的错误是什么............?