These are chat archives for LearnBoost/mongoose

Jan 2015
Hengki Sihombing
Jan 27 2015 02:52
@vkarpov15 what a most different about mongoose V3.8. with v3.9. ?
Hengki Sihombing
Jan 27 2015 04:42
hi everyone
on the documentation page, i look this code
  .group({ _id: null, maxBalance: { $max: '$balance' } })
  .select('-id maxBalance')
  .exec(function (err, res) {
    if (err) return handleError(err);
    console.log(res); // [ { maxBalance: 98 } ]
but i try it on my code
        .match({ position: pos._id })
        .group({_id: '$status'})
        .select('talent position')
        .exec(function (err, res) {
          console.log(err, res);
but i getting erros
.select('talent position')
TypeError: Object #<Aggregate> has no method 'select'
please help @vkarpov15
Jan 27 2015 06:59

@vkarpov15 Hi! Tell me please what I have done with processing errors and now how to work with them? There is a way to hang ( or disable this requirement) handler on all connections at the same time?

P.S.: In 3.9.x

Valeri Karpov
Jan 27 2015 17:01
@aredo aggregations don't have a select() method. Use the .project() helper instead:
@chetverikov can you please clarify what you mean? I don't understand