title: Mongoose. Select nested document's _id
body: <p>My schema looks like the following</p>
  
  <pre><code>var child = new Schema({
    some: String
  });
  var parent = new Schema({
    path: {type: String},
    children: [child]
  });
  var model = mongoose.model('model', parent);
  </code></pre>
  
  <p>Actually I don't need child schema defined separately. It could be defined within parent as well. The issue remains the same.</p>
  
  <p>So, now i <code>model.find</code> the document and expect returned doc to be  </p>
  
  <pre><code>{
  //A lot of mongoose's stuff..
  _doc: {
    _id: ObjectId,
    path: 'some string',
    children: [{
        _id:  ObjectId,
        some: 'other string'
      }]
    }
  }
  </code></pre>
  
  <p>But the children has no <code>_id</code> although when I inspect this document with mongo shell all children have their <code>_id</code>s.</p>
  
  <p>The question is how to fetch these <code>_id</code>s with the document?</p>