These are chat archives for Automattic/mongoose

31st
Aug 2015
Hengki Sihombing
@hengkiardo
Aug 31 2015 04:37

@vkarpov15 can you help me…
i try this script on my server on production

Jobs
    .find({}, 'name company_name job_source')
    .sort({createdAt: -1})
    .exec(function (err, jobs) {
      if (err) return next(err)
      return utils.responses(res, jobs)

    })

but not retrieve on all documents
but when i try on my local machine, its retrieve all docs

maybe you can help or suggest me to changes my config for mongodb on my server?

Maksim
@chetverikov
Aug 31 2015 10:29
@vkarpov15 Hi! When you plan to upgrade mongodb driver to the latest version?
Joseph Thibeault
@jrthib
Aug 31 2015 19:23
is there a way to clear the mongoose.model cache? We happen to use mongoose.connect rather than mongoose.createConnection and our automated tests always fail with the cannot overwrite mongoose model issue since each test tries to establish the models so they can be run independently
how can i clear the mongoose connection without converting everything to use mongoose.createConnection