title: Mongoose query for nested schema
body: <p>I have the following schema:</p>
  <pre><code>const mongoose = require('mongoose');
  const Schema = mongoose.Schema;
  const ProjectSchema = require('./project.js')
  
  const ClientManagerSchema = new Schema({
      name : { type : String,  required : true},
      project : [ProjectSchema]
  });
  
  const  ClientManager = mongoose.model('clientManager' , ClientManagerSchema);
  
  module.exports = ClientManager; 
  </code></pre>
  <p>Inside the clientmanager schema, there is another as you can see. I want to query the database based on a value inside the ProjectSchema.</p>
  <p>I am not sure how to do this but I've tried something like:</p>
  <pre><code>const find = () =&gt; {
     ClientManagers.find({ProjectSchema}).then(e =&gt; {
         console.log(e);
     });
  }
  </code></pre>
  <p>however, this gives me an empty array.</p>