title: Spring JPA Query by Example returns no results
body: <p>I am using Spring's JPA ExampleMatcher without success.</p>
  
  <p>So far, I have:</p>
  
  <pre><code>    ExampleMatcher matcher = ExampleMatcher.matching()
              .withIgnoreNullValues()
              .withMatcher("surname",  match -&gt; match.contains().ignoreCase());
      Person p = new Person();
      v.setSurname("Sm");
  </code></pre>
  
  <p>Hoping to match <code>Person</code> objects whose <code>surname</code> field contains the specified substring.</p>
  
  <p>But I consistently get no results.</p>
  
  <p>On looking up the query log,  can see why: at tries to match all the other fields too. </p>
  
  <p>How can I get <code>ExampleMatcher</code> to ignore all other fields?</p>