title: Hibernate group by of a parent table
body: <p>I have two domain as follows</p>
  
  <pre><code>WishList{
    int id;
    @ManyToOne
    Item item;
  }
  
  Item{
   int id;
   int productCategory;
   String productName;
  }
  </code></pre>
  
  <p>Now Suppose I have product </p>
  
  <pre><code>(1,1,Mobile )
  (2,2,Microwave)
  (3,3,flashDrive)
  (4,1, Monitor)
  </code></pre>
  
  <p>Now How do I group by query in <code>WishList</code> so that I get</p>
  
  <pre><code>(1,1,Mobile )
  (4,1, Monitor)
  (2,2,Microwave)
  (3,3,flashDrive)
  </code></pre>
  
  <p>I am using <code>Hibernate Criteria</code></p>
  
  <p>How to do this??</p>