1
什么是删除用于?我以前没有看到这样的语法,任何人都可以帮助我? 的代码片段是非常容易的,它使用的node.js,猫鼬,MongoDB的node.js“删除”的奇怪语法
function _update(game, callback) {
if (!game) {
callback(new Error("Game must be provided."));
return;
}
if (!game.gameId) {
callback(new Error("Game id should be provided"));
return;
}
var updates = (game instanceof Game) ? game.toObject() : game;
delete updates._id;
updates.modifiedDate = new Date();
Game.findOneAndUpdate({"_id": game.id, "deleted" : {"$ne": true}}, updates, callback);
}
非常感谢,对不起,我的无知javascript – clevertension 2013-02-13 11:36:53
没问题,这就是本网站的目的!你的问题是有效的,值得问,请不要道歉努力改善自己! – 2013-02-13 11:41:04