I don't understand the problem when i read http://mongoosejs.com/docs/populate.html. I don't fully understand what the populate
function does. I picked it up from meanjs
sample source code:
Article.find().sort('-created').populate('user', 'displayName').exec(function (err, articles) {
if (err) {
return res.status(400).send({
message: errorHandler.getErrorMessage(err)
});
} else {
res.json(articles);
}});
Thanks in advance.