title: Chaining promise to update a reference document in Mongoose
body: <p>Given the following schema:</p>
  
  <pre><code>user
    { uid:12345, name:myname, account=null }
  
  account
    { _id:6789, name:"myaccount", _owner:12345 }
  </code></pre>
  
  <p>How can I update the user.account to have the value of its referenced field account._owner. When the account document is created I want to find and replace the user.account value. The route I have looks like this:</p>
  
  <pre><code>app.post('/accounts', authenticate, (req, res) =&gt; {
      var account = new Account({
          name: req.body.name,
          _owner: req.body._owner,
      });
      account.save().then((doc) =&gt; {
      //here i wasnt to update a refernce to a 
      // an account field in a User document and set 
      //it to the account.owner created above.
          res.send(doc);
      }, (e) =&gt; {
          res.status(400).send(e);
      });
  });
  </code></pre>
  
  <p>In my example when the account is created
  I want to update user.account to 6789 (the value of the created account id)</p>