title: Mongoose update embedded document
body: <pre><code>id: { type: String, required: true, unique: true, default: uuid.v1 },
      description: { type: String },
      period: [{
          id: { type: String, default: uuid.v1 },
          start: { type: Date, default: Date.now },
          due: { type: Date },
          dueWarnByHours: { type: Number, integer: true },
          newnessByHours: { type: Number, integer: true },
      }],
  </code></pre>
  
  <p>i have an embedded mongodb database document like this. i tried updating it like the below one</p>
  
  <pre><code>WorkItem.update({ description: req.body.description},{period.rank: 3}, function(err, req) {
          if (err) return console.error(err);
          console.dir(reqWorkItemId + "Successfully removed the workItem from the database");
      });
  </code></pre>
  
  <p>but it isn't working how to update the embedded child part period->rank using mongoose</p>