title: Mongoose populate returns null
body: <p>I have been searching for this for hours now. But none of the solutions worked or me.</p>
  
  <p>I have two models.</p>
  
  <p>Articles:</p>
  
  <pre><code>const mongoose = require("mongoose");
  
  const Schema = mongoose.Schema;
  
  const articlesSchema = new Schema({
      articleHeader: String,
      articleBody: String,
      byUserId: {type: Schema.Types.ObjectId, ref: 'user'},
      additionDate: Date,
  });
  
  module.exports = mongoose.model('articles', articlesSchema, 'ArticlesInfo');
  </code></pre>
  
  <p>Users:</p>
  
  <pre><code>const mongoose = require("mongoose");
  
  const Schema = mongoose.Schema;
  
  const userSchema = new Schema({
      fname: String,
      lname: String,
      email: String,
      pwd: String,
      dob: Date,
      gender: String,     
  });
  
  module.exports = mongoose.model('user', userSchema, 'UserInfo');
  </code></pre>
  
  <p>And my query goes like this:</p>
  
  <pre><code>router.get('/articles', function(req,res){
  
      article.find().populate("byUserId").sort({"additionDate": -1}).exec(function(err, articl) {
          if(err) {
              res.send("Error! " + err);
          } else {
              console.log(articl);
              res.json(articl);
          }
      });
  
  });
  </code></pre>
  
  <p>But my output is always:</p>
  
  <pre><code>    {
          "_id": "5a13254a081af40d6c55654e",
          "additionDate": "2017-11-20T18:56:10.951Z",
          "byUserId": null,
          "articleBody": "Body 1",
          "articleHeader": "Header 1",
          "__v": 0,
      }
  </code></pre>
  
  <p>When I remove the populate,"byUserId" is returning ObjectId.</p>