title: MongoDB $lookup Objectid get empty array?
body: <p>I'm new to mongodb and practice <code>aggregate</code> with <code>$lookup</code> in mongoose following document, And i met a question really confusing.</p>
  
  <p>I have user Schema </p>
  
  <pre><code>const userSchema = new Schema({
    userName: {type: String, index:{unique: true}},
    password: String,
    avatar: String
  })
  </code></pre>
  
  <p>comment Schema</p>
  
  <pre><code>const commentSchema = new Schema({
    post: {type: Schema.Types.ObjectId, ref:'postModel'},
    author:{type: Schema.Types.ObjectId, ref:'userModel'},
    content: String,
    createTime: Date
  })
  </code></pre>
  
  <p>and models <code>commentModel= mongoose.model('commentModel', commentSchema)</code>
  <code>userModel = mongoose.model('userModel', userSchema)</code>
  Then i do </p>
  
  <pre><code>commentModel.aggregate.([{$lookup: {
    from: 'userModel',
    localField: 'author',
    foreignField: '_id',
    as: 'common'
  }])
  </code></pre>
  
  <p>But i get empty common in the query. According to the data in db, I shouldn't get this result. After searching i still can not find what's the mistake.</p>
  
  <p>Last but not least, I need to use <code>aggregate</code> method, so i have to  use <code>$lookup</code> on reference document, dose it make sense?</p>