title: How can remove _id from embedded object in Mongoose schema?
body: <p>I have this Mongoose schema:</p>
  
  <pre><code>const User = mongoose.model('User', new Schema({
      id: String,
      name: String,
      extra: { bb: Number, chain: Number }
  }), 'users');
  </code></pre>
  
  <p>When I see a new <code>User</code>, it's stored like this:</p>
  
  <pre><code>{ 
    _id: ...,
    id: '1234',
    name: 'John',
    extra: {
      _id: ...,
      bb: 54,
      chain: 7
    },
    __v: 1
  }
  </code></pre>
  
  <p>As you see, Mongoose (or Mongo, I don't know) is including a <code>_id</code> in embedded object <code>extra</code>. Why is that happening? How can I prevent it to happen?</p>