From e2c8e168a53c892ba05614898368ac8f71d1fcbd Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Fri, 24 May 2013 16:09:37 +0200 Subject: don't get so many fields.. faster loading --- models/pPost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/pPost.js b/models/pPost.js index d36eb36..ad17890 100644 --- a/models/pPost.js +++ b/models/pPost.js @@ -36,7 +36,7 @@ pPostSchema.statics = { load: function(id, callback) { this.findOne({ _id: id }) - .populate('user') + .populate({ path: 'user', select: '_id, name'}) .exec(callback); }, -- cgit v1.2.3