title: Can access Mongoose model fields externally but not from within model method
body: <p>I have the following mongoose schema:</p>
  
  <pre><code>const memberSchema = new mongoose.Schema({
      name: String,
      roomA: Boolean,
      roomB: Boolean,
      roomC: Boolean,
  });
  </code></pre>
  
  <p>In the same file, I define an instance method to tally a rental total for the member, using a prices object defined elsewhere:</p>
  
  <pre><code>memberSchema.methods.balance = () =&gt; {
      let total = 0;
  
      if (this.roomA) {total += prices.roomA;}
      if (this.roomB) {total += prices.roomB;}
      if (this.roomC) {total += prices.roomC;}
  
      return total;
  }
  
  mongoose.model('Members', memberSchema);
  </code></pre>
  
  <p>In my routes file, I look up the member from inside a get function and pass member data into the member's page</p>
  
  <pre><code>return members.findById(req.id).then(member =&gt; {
      console.log(member);
      const balance = member.balance();
      res.render('members/home', {
          title: 'Welcome ' + member.name,
          "balance" : balance,
      });
  });
  </code></pre>
  
  <p>After the findByID call, member has all its field defined correctly, and the balance call succeeds.  However, it returns '0', as the instance fields are all undefined within that method.  </p>
  
  <p>If instead of</p>
  
  <pre><code>const balance = member.balance();
  </code></pre>
  
  <p>I use</p>
  
  <pre><code>const balance = homeController.balance({member, prices});
  </code></pre>
  
  <p>it returns the correct total.  homeController.balance is very similar:</p>
  
  <pre><code>exports.balance = (req, res) =&gt; {
      let total = 0;
  
      if (req.member.roomA) {total += req.prices.roomA;}
      if (req.member.roomB) {total += req.prices.roomB;}
      if (req.member.roomC) {total += req.prices.roomC;} 
  
      return total;
  }
  </code></pre>
  
  <p>How do I access the member's fields from within member.balance()?</p>