Mongoose populate in feathers
<p>I'm new in node and I'm using Feathersjs.
I'm trying to use mongoose populate to do the relation between <code>users</code> and <code>tasks</code></p>

<p>My models:</p>

<p><code>user-model.js</code></p>

<pre><code>const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const userSchema = new Schema({
email: {type: String, required: true, unique: true},
password: { type: String, required: true },
tasks: [{ type: Schema.Types.ObjectId, ref: 'Task' }],
createdAt: { type: Date, 'default': Date.now },
updatedAt: { type: Date, 'default': Date.now }
});

var Task = mongoose.model('Task', storySchema);
const userModel = mongoose.model('user', userSchema);

module.exports = userModel;
</code></pre>

<p><code>task-model.js</code></p>

<pre><code>const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const taskSchema = new Schema({
title: { type: String, required: true },
_creator : { type: String, ref: 'User' },
createdAt: { type: Date, 'default': Date.now },
updatedAt: { type: Date, 'default': Date.now }
});

var User = mongoose.model('user', storySchema);
const taskModel = mongoose.model('task', taskSchema);

module.exports = taskModel;
</code></pre>

<p>When I add a new Task, user.tasks still empty: </p>

<pre><code>&gt; db.users.find().pretty()
{
    "_id" : ObjectId("5832da6919756a0edc2dfc59"),
    "email" : "igorpollo@gmail.com",
    "password" : "$2a$10$DToGYQ8smdfsK4oJPXmcyOdIfxXEaQGO5P16AhzBlrpESUMt5baNi",
    "updatedAt" : ISODate("2016-11-21T11:28:41.371Z"),
    "createdAt" : ISODate("2016-11-21T11:28:41.371Z"),
    "tasks" : [ ],
    "__v" : 0
  }
 &gt; db.tasks.find().pretty()
 {
    "_id" : ObjectId("5832da7619756a0edc2dfc5a"),
    "title" : "test",
    "_creator" : "5832da6919756a0edc2dfc59",
    "updatedAt" : ISODate("2016-11-21T11:28:54.470Z"),
    "createdAt" : ISODate("2016-11-21T11:28:54.470Z"),
    "__v" : 0
}
</code></pre>