title: Hibernate Criteria API on Child table
body: <p>Here is the 2 DTO:</p>
  
  <pre><code>class Item { 
      private Integer id; 
      private Integer serviceId;
      private String itemGuid; 
      private String meterId; 
      private Integer resourceId; 
      private String meterName; 
      private String description; 
      private String category; 
      private String subCategory; 
      private List rates; 
  }
  public class Rates { 
      private Integer id; 
      private Double unit; 
      private Double price; 
      private String field1Unique; 
      private String field2Unique; 
      private String field1Index; 
      private String field2Index; 
      private String serviceData; 
  }
  </code></pre>
  
  <p>The relationship between Item and Rates is given below : </p>
  
  <pre><code>@OneToMany(mappedBy = "ItemDTOs", fetch = FetchType.LAZY)
  </code></pre>
  
  <p>and in Rates table the join column is below : <code>@JoinColumn(name = "Item_id", nullable = false)</code></p>
  
  <p>I need to fetch all the Items along with Rates where Item.serviceId=10(from item table ) and Rates.field1Index=24 (From Rates table)</p>
  
  <p>Can you tell me please how can I fetch that using criteria API</p>