title: Remove referenced document in mongoose
body: <p>I've successfully removed the subdocument of the parent using $pull. 
  Now, how would I delete the subdocument in its own schema? 
  Im sorry if it doesn't make any sense, node.js newb here. :)</p>
  
  <p>UserSchema</p>
  
  <pre><code>var userSchema = new Schema({
     posts:[{type:Schema.Types.ObjectId,ref:'post'}]
  });
  </code></pre>
  
  <p>PostSchema</p>
  
  <pre><code>var postSchema = new Schema({
     user:{type:Schema.Types.ObjectId,ref:'user'}
  });
  </code></pre>
  
  <p>Deletion:</p>
  
  <pre><code>User.findByIdAndUpdate(id, 
     {$pull:{'posts':post_id}},function(err,model){
        if(!err){
           console.log(model);
           resolve(model);
        }
        else{
          reject(err);
        }
  });
  </code></pre>