title: Query mongodb using Predicate and sub-document $type
body: <p>What I am looking for is how do you translate a query using java spring mongodb based on type of the sub-document into a Predicate. </p>
  
  <p>A normal query would look something like:</p>
  
  <pre><code>Query query = new Query(Criteria.where("data").type(3)).with(pageRequest);
  </code></pre>
  
  <p>How do I translate this into a predicate query?
  Something like:</p>
  
  <pre><code>QEmployee employee = new QEmployee("employee");
  return employeeRepository.findAll(employee.data.type.is(3), pageRequest);
  </code></pre>
  
  <p>But I am not sure how to translate it. Any help would be appreciated!</p>
  
  <p>Does the current version of spring-mongo support it?</p>
  
  <p>A part of my pom.xml  </p>
  
  <pre><code>&lt;properties&gt;
      &lt;spring.version&gt;3.2.4.RELEASE&lt;/spring.version&gt;
      &lt;sd.jpa.version&gt;1.3.4.RELEASE&lt;/sd.jpa.version&gt;
      &lt;sd.mongodb.version&gt;1.2.3.RELEASE&lt;/sd.mongodb.version&gt;
      &lt;powermock.version&gt;1.5&lt;/powermock.version&gt;
  &lt;/properties&gt; 
  </code></pre>