title: Mongoose saving with objectId
body: <p>I am trying to save comments for a post. When I POST a comment from client side, the comment should be saved with the ObjectId of the post, which I collect from the post page - req.body.objectId. I have tried the method below, but it only gives me VALIDATION ERROR.</p>
  
  <p>MODEL</p>
  
  <pre><code>var Comment = db.model('Comment', {
      postId: {type: db.Schema.Types.ObjectId, ref: 'Post'},
      contents: {type: String, required: true}
  }  
  </code></pre>
  
  <p>POST</p>
  
  <pre><code>router.post('/api/comment', function(req, res, next){
      var ObjectId = db.Types.ObjectId; 
      var comment = new Comment({
          postId: new ObjectId(req.body.objectId),
          contents: 'contents'
      }
  </code></pre>
  
  <p>How can I achieve this? and Is this the right way to implement such functionality? Thank you in advance.</p>