title: Why are my Mongoose 3.8.7 schema getters and setters being ignored?
body: <p>While working with Node.js, Mongoose and MongoDB, I have found that my Mongoose schema getters and setters do not fire when I perform a findOne query.</p>
  
  <p>I have found an old thread that suggests there was an issue with getters and setters in version 2.x, but it states that it has since been resolved and I'm using the very latest version of Mongoose (3.8.7).</p>
  
  <p><strong>Here's part of my schema</strong></p>
  
  <pre><code>function testGetter(value) {
          return value + " test";
  }
  
  /**
  * Schema
  */
  
  var schema = new Schema({
          username: { type: String, required: true, unique: true, get: testGetter }
  });
  
  // I have also tried this.
  
  schema.path('username').get(function (value, schemaType) {
          return value + " test";
  });
  </code></pre>
  
  <p><strong>Here's how I execute the query</strong></p>
  
  <pre><code>Model
  .findOne(conditions, fields, options)
  .populate(population)
  .exec(function (error, doc) {
          callback(doc, error);
  });
  </code></pre>
  
  <p>It responds with a username value that lacks the " test" post-fix. Am I doing something wrong here? Any help would be greatly appreciated!</p>
  
  <p><strong>Additional information</strong></p>
  
  <p>This is the result of the find one:</p>
  
  <pre><code>{
      "username": "Radius"
  }
  </code></pre>
  
  <p>This is the value of schema.paths.username.getters after applying one through one of the two ways described above:</p>
  
  <pre><code>[ [Function: testGetter] ]
  </code></pre>