collection.update({
"name": name,
"time.day": day,
"title": title
}, {
$push: {"comments": comment}
} , function (err, result) {
mongodb.close();
callback(null);
});
这样插不入,是不是要用findAndModify
回复 (1)
T
我在学第六章也是,遇到cannot read property foreach of undefined这个错误? 你呢?
参与回复
登录后即可参与回复。登录