title: How to Find record by ObjectID's property in Mongodb?
body: <p>Suppose I have 2 models like Orders and Customers.</p>
  <pre><code>const orders = mongoose.Schema({
        customer_id: {
        type: mongoose.Schema.ObjectId      
        required: true,
        ref: 'Customer',
      },
      OrderNo: {
        type: String,
        required: true,
      })
  
  const customers = mongoose.Schema({
      name: {
        type: String,
        required: true,
      })
  </code></pre>
  <p>I want to filter <strong>orders based on customer's name</strong> as per below.</p>
  <pre><code>let query = {
          'customer_id.name': { $regex: '.*AMAZON.*' },
        }
  
  await Orders.find(query)
  </code></pre>
  <p>but its not working properly. I'm new to mongodb. Can anyone share feasible solution ? Thanks</p>