title: Unable to find sub documents in mongodb by their id using findOne()
body: <p>Test cases to check status 200 and status 400 are failing. In both cases, I receive the status as 404, which means the rental doesn't exist in db.</p>
  <pre><code>const rental_exists = await RentalCollectionClass.findOne({
                                                      &quot;customer._id&quot; : req.body.customerId,
                                                      &quot;movie._id&quot; : req.body.movieId });
          if(!rental_exists) 
              return res.status(404).send('Rental with given customer/movie not in db'); 
          if(rental_exists.dateReturned)         
              return res.status(400).send('Rental with given customer/movie already processed');   
          return res.status(200).send('Valid rental posted');  
  </code></pre>
  <p>But I have created the rental in beforeEach() function of the testcase as below.</p>
  <pre><code>beforeEach(async () =&gt; {
          customerId = mongoose.Types.ObjectId();
          movieId = mongoose.Types.ObjectId();
          rental = new RentalCollectionClass({
              customer : {
                  id : customerId,
                  name : 'nandhini',
                  phone : 12345
              },
              movie : {
                  id : movieId,
                  title : 'movieTitle',
              }
          });
          await rental.save();
      });
  </code></pre>
  <p>Also note that the customer &amp; movie are sub documents of rental. Help me fix this please!!</p>