【发布时间】:2012-03-24 19:19:43
【问题描述】:
我想从我的 Node.js 应用程序中的 Mongoose 设置中检索一些数据。我注意到无论我写什么作为字段选择,我总是得到_id 字段。有办法不取吗?
这就是我现在的做法:
Transaction.find({username : user.username}, ['uniqueId', 'timeout', 'confirmation_link', 'item_name'], function(err, txs){
console.log("user : " + user.username + " with txs: " + txs);
callback(txs);
});
并记录包含_id 字段的结果。
【问题讨论】: