title: Sum projection and results constraint
body: <p>I have 100 entities in db. I want to get sum by some property of first 20 entities</p>
  
  <pre><code>Criteria cr = getSession().createCriteria(Entity.class);
  cr.setFirstResult(0);
  cr.setMaxResults(20);
  cr.setProjection(Projections.sum("propertyName"));
  Double sum = cr.uniqueResult();
  </code></pre>
  
  <p>but criteria returns sum of all entities because setMaxResults(20) restricts sum values result and that is one object - uniqueResult. Mean that construction is incrorrect. How to get sum of several entities using criteria properly?</p>