title: Mongoose - Can't push a subdocument into an array in parent Document
body: <p>I am trying to push a subdocument(ApplicationSchema) into my Job schema. But it doesn't seem to work.</p>
  
  <p>Following is my Job Schema :</p>
  
  <pre><code>import mongoose from 'mongoose';
      const Schema = mongoose.Schema;
  
      var ApplicationSchema = require('./Application');
  
      const Job = new Schema({
        skills : {
          type : Array
        },
        active : {
          type : Boolean,
          default : false
        },
        applications: [ApplicationSchema],
        userId : {
          type: mongoose.Schema.Types.ObjectId,
          ref: 'User'
        }
      },{timestamps : true});
  
      export default mongoose.model("Job", Job)
  </code></pre>
  
  <p>This is subdocument(ApplicationSchema). I have 5 more subdocuments in this schema.
  I am pushing an object with a key-value pair of talentId and its value. But it doesn't work.
  I get a new object in the array but the object I'm trying to push is not pushed.</p>
  
  <pre><code>import mongoose from 'mongoose';
  const Schema = mongoose.Schema;
  
  var notesSchema = require('./notesSchema');
  var documentSchema = require('./documentSchema');
  var assessmentSchema = require('./assessmentSchema');
  var interviewScheduleSchema = require('./interviewScheduleSchema');
  var referenceSchema = require('./referenceSchema')
  
  const ApplicationSchema = new Schema({
    talentId: {
      type: mongoose.Schema.Types.ObjectId,
      ref: 'Talent'
    },
    applicationType: {
      type: Number
    }
    notes: [notesSchema],
    documents: [documentSchema],
    assessment: [assessmentSchema],
    interviewSchedule: [interviewScheduleSchema],
    references: [referenceSchema]
  },{
    timestamps: true
  });
  
  export default ApplicationSchema;
  </code></pre>
  
  <p>Following is my code in the API endpoint</p>
  
  <pre><code>.post((req, res, next) =&gt; {
    Job.findById(req.params.jobId)
    .then((job) =&gt; {
      if (job != null) {
        job.applications.push(req.body);
        job.save()
        .then((job) =&gt; {
          res.statusCode = 200;
          res.setHeader('Content-Type', 'application/json');
          res.json(job);
        })
      }
      else {
        err = new Error('Job ' + req.params.jobId + 'not found')
        err.status = 404;
        return next(err);
      }
    }, (err) =&gt; next(err))
    .catch((err) =&gt; next(err));
  })
  </code></pre>
  
  <p>req.body contains following object</p>
  
  <pre><code>{ talentId: '5a813e1eb936ab308c4cae51' }
  </code></pre>