title: how to group by columns without projection in hibernate criteria?
body: <p>i am trying to fetch only max(assetHistoryId) but my below code returing 3 columns  max(assetHistoryId), eventId, and assetIdentifier in result.
  how to group the columns with out projection using criteria. 
  you can find my code below.</p>
  
  <pre><code>final Criteria agcriteria  = createCriteria(someclass.class);    
      agcriteria.add(Restrictions.in("eventId", listOfEventIds));
      agcriteria.add(Restrictions.ne("action", "T"));
      agcriteria.add(
              Restrictions.between("modifyDate", lastProcessedTime,
                      batchStartTime));
      agcriteria.setProjection(Projections.projectionList()
              .add(Projections.groupProperty("assetIdentifier"))
              .add(Projections.groupProperty("eventId"))
              .add(Projections.max("assetHistoryId")));
      val = agcriteria.list(); 
  </code></pre>
  
  <p>please help me any one ?</p>