title: Spring Data MongoDB find query returning no results
body: <p>I have a mongodb collection with multiple documents of following structure</p>
  
  <pre><code>{
      "_id" : "...",
      "_class" : "...",
      ...
      "travelers" : [
          {
              "id": "12345",
              "type": "XYZ"
          },
          {
              "id": "67890",
              "type": "ABC"
          }],
      ...
  }
  </code></pre>
  
  <p>Using spring data, I am able to fetch documents that have traveler type XYZ :</p>
  
  <pre><code>Query query = new Query(Criteria.where("travelers.type").is("XYZ");
  List&lt;Something&gt; something = mongoTemplate.find(query, Something.class, COLLECTION_NAME);
  </code></pre>
  
  <p>But if I switch the query to fetch by traveler id, I get no results:</p>
  
  <pre><code>Query query = new Query(Criteria.where("travelers.id").is("12345");
  List&lt;Something&gt; something = mongoTemplate.find(query, Something.class, COLLECTION_NAME);
  </code></pre>
  
  <p>I enabled all logs and the outgoing query is <code>{"travelers.id" : "12345"}</code> which looks right. Running the query <code>{"travelers.id" : "12345"}</code> directly on the db returns the right results.</p>
  
  <p>Other queries I have tried on the collection seem to work fine. I have tried both with &amp; without index on travelers.id and no results in both cases. What am I doing wrong?</p>