db.collection('users', function(err, users)
{
if (!err)
{
users.update({company:cursor[i].name}, {$set:{active:false}}, function() {});
}
});
cursor[i].name
文字列値があり、それを使用すると正常に表示されますconsole.log()
。
ドキュメントは更新されていません。MongoHQ でリモート データベースを使用し、ネイティブ mongodb ドライバーで Node.js サーバーを実行しています。同じデータベースに接続しているときにシェルでクエリを実行すると、正常に動作します。
編集:代わりにintを使用しましたが、false
うまくいきました。ブール値をmongodbに挿入できますか? もしそうなら、どのように?