Skip to content

Instantly share code, notes, and snippets.

@alanhoff
Created May 7, 2013 20:23
Show Gist options
  • Save alanhoff/5535800 to your computer and use it in GitHub Desktop.
Save alanhoff/5535800 to your computer and use it in GitHub Desktop.
var parametro = 'ID da categoria';
this.find({}).populate({
path : 'grpcategoria',
match : {
_id : parametro
}
}).exec(function(err, docs){
console.log(err, docs);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment