title: Populate Multiple Mongoose Model Fields using Mongoose-paginate plugin
body: <p>I have a Mongoose Schema (Appointment) with two ref fields (sender and receiver). Both referencing the same Schema (User). I am trying to populate these two fields using mongoose-paginate plugin.</p>
  
  <p>The Appointment Schema snippet.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var paginate = require('mongoose-paginate');
  
  var AppointmentSchema = new Schema({
    dateCreated: {type: Date, default: Date.now},
    sender: {type: ObjectId, ref: 'User'},
    receiver: {type: ObjectId, ref: 'User'},
    message: String,
    
    .........................
    
  AppointmentSchema.plugin(paginate);
  
  var Appointment = mongoose.model('Appointment', AppointmentSchema);
  module.exports = Appointment;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The User Schema snippet.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var UserSchema = new Schema({
    username: String,
    name: {
      first: String,
      middle: String,
      last: String
    },
    
    ..................
    
  var User = mongoose.model('User', UserSchema);
  
  module.exports = User;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The mongoose paginate query.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Appointment.paginate({}, request.query.page, request.query.limit,
      function(error, pageCount, appointments, itemCount) {
        if (error) {
           return console.log('ERRRRRRRRRR'.red);
        } else {
          console.log(appointments);
          return response.render('message/inbox',
          {
            pageTitle: "Trash",
            messages: appointments,
            pageCount: pageCount,
            itemCount: itemCount,
            currentPage: currentPage
          });
        }
      }, {columns: {}, populate: 'receiver', populate: 'sender', sortBy: {title: -1}});</code></pre>
  </div>
  </div>
  </p>
  
  <p>This works fine but i want to populate both the sender and receiver fields. Please how do i go about that. I tried passing the fields in JSON but didn't work.</p>