title: How to add schema method in mongoose?
body: <p>I've been trying to find out how to add schema methods in Mongoose which will use model attributes and modify them in some way. Is it possible to make the code below work?</p>
  
  <pre><code>var mySchema = new Schema({
    name: {
      type: String
    },
    createdAt: {
      type: Date, 
      default: Date.now
    },
    changedName: function () {
      return this.name + 'TROLOLO';
    }
  });
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code>MySchema.findOne({ _id: id }).exec(function (error, myschema) {
     myschema.changedName();
  });
  </code></pre>