On 1 Jan 2013 07:35, "ayaz ali" <[email protected]> wrote: > > Hello how to use group by in mongoose i have tried this but it displays undefined > > Model.find({}, [], {'group': 'FIELD'}, function(err, logs) { > > // code > > }); > > MessageModel.find({'messageTo':userName, "deliveredStatus":false}, {'group': 'messageFrom'}, (function (err, MessageModel) { > var returnData; > if(err){ > return cb(err.message); > } else > { > cb(null, chatMessageModel); > } > > cb(null, returnData); > })); > any one please help me out > > --
Hi, The function you pass to MessageModel.find declares a MessageModel argument and then refers to chatMessageModel, could it be the source of the problem? nico > Job Board: http://jobs.nodejs.org/ > Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
