These are chat archives for Automattic/mongoose

15th
Mar 2016
Anubhav Chaturvedi
@anubhavchaturvedi
Mar 15 2016 15:20

Hi, I am doing findOneAndUpdate with upsert:true

BugsETA.findOneAndUpdate(
            {JIRA_ID: jiraId, developer: developer},
            { ETA: eta},
            {upsert: true},
            function(err){
                if(err)
                    res.send("failure: " + err);
                else
                    res.send("inserted");
        });

This creates a record with JIRA_ID and developer as fields but not ETA

how to have the ETA as well
what am i missing?
Eduardo Júnio Santos Macêdo
@eduardojunio
Mar 15 2016 15:32
Hello world!
Anubhav Chaturvedi
@anubhavchaturvedi
Mar 15 2016 15:55
resolved it
:)