title: Mongoose populate embedded
body: <p>I use Mongoose.js and cannot solve problem with 3 level hierarchy document.</p>
  
  <p>There 2 ways to do it.</p>
  
  <p><strong>First</strong> - without refs.</p>
  
  <pre><code>C = new Schema({
      'title': String,
  });
  
  B = new Schema({
      'title': String,
      'c': [C]
  });
  
  A = new Schema({
      'title': String,
      'b': [B]
  });
  </code></pre>
  
  <p>I need to show C record. How can i populate / find it, knowing only _id of C?</p>
  
  <p>I was try use:</p>
  
  <pre><code>A.findOne({'b.c._id': req.params.c_id}, function(err, a){
      console.log(a);
  });
  </code></pre>
  
  <p>But i dont know how to get from returnet a object only c object that i need.</p>
  
  <p><strong>Second</strong> if working with refs:</p>
  
  <pre><code>C = new Schema({
      'title': String,
  });
  
  B = new Schema({
      'title': String,
      'c': [{ type: Schema.Types.ObjectId, ref: 'C' }]
  });
  
  A = new Schema({
      'title': String,
      'b': [{ type: Schema.Types.ObjectId, ref: 'B' }]
  });
  </code></pre>
  
  <p>How to populate all B, C records to get hierarchy?</p>
  
  <p>I was try to use something like this:</p>
  
  <pre><code>A
  .find({})
  .populate('b')
  .populate('b.c')
  .exec(function(err, a){
      a.forEach(function(single_a){
          console.log('- ' + single_a.title);
          single_a.b.forEach(function(single_b){
              console.log('-- ' + single_b.title);
              single_b.c.forEach(function(single_c){
                  console.log('--- ' + single_c.title);
              });
          });
      });
  });
  </code></pre>
  
  <p>But it will return undefined for single_c.title. I there way to populate it?</p>
  
  <p>Thanks.</p>