populate with mongoose pagination : <p>i tried to fetch data using <code>npm</code> <code>mongoose-paginate</code> but populate is not working </p>

<p>here is my <code>UsersSchema.js</code></p>

<pre><code>var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var usersSchema = new Schema({
    name : String,
    created_at : { type : Date, default : Date.now }
});

module.exports = mongoose.model('users',usersSchema);
</code></pre>

<p><strong>here is post schema</strong></p>

<pre><code>var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var mongoosePaginate = require('mongoose-paginate');

var postsSchema = new Schema({
    user : { type: Schema.Types.ObjectId, ref: 'users' },
    post : String,
    created_at : { type : Date, default : Date.now }
});
postsSchema.plugin(mongoosePaginate);
module.exports = mongoose.model('posts',postsSchema);
</code></pre>

<p><strong>here is my query</strong> </p>

<pre><code>var options = {
    sort:     { created_at: -1 },
    lean:     true,
    offset:   offset,
    populate : 'users',
    limit:    10
};
postsSchema.paginate({user:user},options,function(err,posts){
    if(err){
        console.log(err)
        return false;
    }
    console.log(posts)
});
</code></pre>

<p>user provide objectID not a users data.
i.e </p>

<pre><code>[{
   user : objectID(987654ff11aa),
   post : 'post'
}]  
</code></pre>
