These are chat archives for Automattic/mongoose

Oct 2016
Paul "Joey" Clark
Oct 28 2016 10:07
Use promises to make 3 queries in parallel:
const studentsPromise = Student.find({…}).exec();
const classesPromise  =   Class.find({…}).exec();

Promise.all([studentsPromise, classesPromise, teachersPromise])
    .then(results => {
        console.log(’Teachers are:’, results[2]);
Oct 28 2016 13:54
Hello all, for my problem I have solved with $elemMatch directive
Joseph Thibeault
Oct 28 2016 18:14
at what points during a document’s lifecycle do the setters get run?
i figured out that they run when you do new TestModel(), and when you set properties on a doc.
to they ever get ran again before validation or save?