title: Mongoose deep populating multiple 2nd level objects not working
body: <p>I have a model <code>A</code> wit this field : </p>
  
  <pre><code>var field = {
      foo: String,
      b: [{ type: Schema.Types.ObjectId, ref: 'B' }]
  }  
  </code></pre>
  
  <p>and model <code>B</code> with this feilds : </p>
  
  <pre><code>var field = {
      c: { type: Schema.Types.ObjectId, ref: 'C' } // let's say this has 3 string field
      d: { type: Schema.Types.ObjectId, ref: 'D' } // so was this
  }
  </code></pre>
  
  <p>Based on this <a href="https://stackoverflow.com/a/34444634/2889614">answer</a> by <a href="https://stackoverflow.com/users/533738/trinh-hoang-nhu">Trinh Hoang Nhu</a> by doing this-</p>
  
  <pre><code> A.find({_id:req.params.id})
      .populate({ path: 'patient', model: Patient,
          populate: {
              path: 'b',
              model: B
          },
          populate: {
              path: 'c',
              model: C
          },
      })
      .exec(function (err, doc) {
          res.send(doc);
      })
  </code></pre>
  
  <p>-it should return the populated 2nd level and it did but the problem is it only <code>populate</code> the last <code>path</code> declared on the <code>.populate({})</code> function, in this case only the model <code>C</code> is populated. But when you changed it's position with model <code>B</code> then model <code>B</code> will be populated. </p>
  
  <p>The query above returns something like this : </p>
  
  <pre><code>[
      {
          "foo":"Bar",
          "b": [
              {
                  "c":"a32s1da4fas1a23s1da56s4c",
                  "d":{
                      "foo1":"Bar1",
                      "foo2":"Bar2",
                      "foo3":"Bar3"
                  }
              },
              {
                  "c":"a32s1da4fas1a23s1da56s4d",
                  "d":{
                      "foo1":"Bar1",
                      "foo2":"Bar2",
                      "foo3":"Bar3"
                  }
              }
              // so on ...
          ]
      }
  ]
  </code></pre>
  
  <p>I was expecting something like this :</p>
  
  <pre><code>[
      {
          "foo":"Bar",
          "b": [
              {
                  "c":{
                      "foo1":"Bar1",
                      "foo2":"Bar2",
                      "foo3":"Bar3"
                  },
                  "d":{
                      "foo1":"Bar1",
                      "foo2":"Bar2",
                      "foo3":"Bar3"
                  }
              },
              {
                  "c":{
                      "foo1":"Bar1",
                      "foo2":"Bar2",
                      "foo3":"Bar3"
                  },
                  "d":{
                      "foo1":"Bar1",
                      "foo2":"Bar2",
                      "foo3":"Bar3"
                  }
              }
              // so on ...
          ]
      }
  ]
  </code></pre>