title: Selecting multiple sums HQL
body: <p>If i run the query below I get a list of Objects that I cant cast to Long  </p>
  
  <pre><code>String queryString = "select sum(cat.varaible1), sum(cat.varaible2) from Enrollment as cat where cat.created &gt;= :startDate and cat.created &lt;= :endDate";
  </code></pre>
  
  <p>If I remove sum(cat.varaible2) then I get a list containing a long value back. </p>
  
  <pre><code>String queryString = "select sum(cat.varaible1) from Cat as cat where cat.created &gt;= :startDate and cat.created &lt;= :endDate";
  </code></pre>
  
  <p>Why is this happening? Please explain</p>