These are chat archives for Automattic/mongoose

8th
Jul 2015
Hengki Sihombing
@hengkiardo
Jul 08 2015 08:42
hi @all can anyone convert this query using mongoosejs
db.jobs.group({
    "key": {
        "person": true
    },
    "initial": {
        "total": 0
    },
    "reduce": function(obj, prev) {
        if (obj.person != null) if (obj.person instanceof Array) prev.total += obj.person.length;
        else prev.total++;
    }
});
Zheyuan Chen
@czheo
Jul 08 2015 08:47
@all Can anybody help me have a look at this issue? Automattic/mongoose#3146
truonguit2010
@truonguit2010
Jul 08 2015 15:30
hi, I want to make collection in runtime. This collection will cache data for this user request.
This is OK? And how to I create a collection in runtime.
Collection is named “discover+userid"
Erinç Fırtına
@EricMcRay
Jul 08 2015 22:49
how can i define static query option as default for all finds and other queries? like Model.find() == Model.find({ deleted: true })