0
mongodb 데이터베이스의 문서와 실패한 비참한 문서를 업데이트하려고합니다. 여기문서 업데이트
https://github.com/mongodb/node-mongodb-native 내 코드입니다 :
내가 Node.js를이 드라이버를 사용하고 여기에
db.collection('test').update({ _id: '5210f6bc75c7c33408000001' }, {$set: { title: "new title"}, {w:1}, function(err) {
if (err) console.warn(err.message);
else console.log('successfully updated');
});
내 데이터베이스입니다 : 나는 successfully updated
메시지를 작성
> db.test.find()
{ "type" : "new", "title" : "my title", "desc" : [ "desc 1" ], "_id" : ObjectId("
5210f6bc75c7c33408000001") }
>
하지만, 변화는 일어나지 않았다.
내가 뭘 잘못하고 있니?