title: One to many save no response (promises)
body: <p>I'm stuck saving a object with an array of object Id. I'm using node.js with restify and mongoose.</p>
  
  <p>I have an outfit-request with many outfit-choices:</p>
  
  <p><strong>Model:</strong></p>
  
  <pre><code>const outfitRequestsSchema = new mongoose.Schema({
    user: {
      type: mongoose.Schema.Types.ObjectId,
      ref: 'User'
    },
    title: {
      type: String
    },
    maxCost: {
      type: Number
    },
    outfitChoices: [{
      type: mongoose.Schema.Types.ObjectId,
      ref: 'OutfitChoice'
    }]
  }, {usePushEach: true});
  </code></pre>
  
  <p><strong>Router:</strong></p>
  
  <pre><code>application.post('/outfit-choices', (req, resp, next) =&gt; {
        OutfitRequest.findById(req.body.outfitRequest)
          .then(outfitRequest =&gt; {
            console.log(outfitRequest);
            const outfitChoice = new OutfitChoice(req.body);
            outfitChoice.save().then(outfitChoice =&gt; {
              outfitRequest.outfitChoices.push(outfitChoice._id);
              outfitRequest.save()
                .then(outfitRequestNew =&gt; {
                  console.log(outfitRequestNew);
                  this.render(resp, next);
                })
                .catch(next);
  
            }).catch(next);
  
          })
          .catch(next);
      });
  </code></pre>
  
  <p><strong>Render method:</strong></p>
  
  <pre><code>render(response: restify.Response, next: restify.Next) {
      return (document) =&gt; {
        if (document) {
          this.emit('beforeRender', document);
          response.json(document);
        } else {
          response.send(404);
        }
  
        return next();
      }
    }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/pMzrU.png" rel="nofollow noreferrer">Restlet screen</a></p>
  
  <p>It keeps in a loop, but the record is saved in the db</p>
  
  <p><a href="https://i.stack.imgur.com/STekL.png" rel="nofollow noreferrer">DB screen</a></p>
  
  <p>I think that is a problem with chained promises, but I can't find out how to solve this.</p>