title: Cannot create TypedQuery for query with more than one return
body: <p>I am using the following JPA query and i am getting the java.lang.IllegalArgumentException: Cannot create TypedQuery for query with more than one return  Exception.</p>
  
  <pre><code>TypedQuery&lt;RaBdrRating&gt; uQuery = 
    (TypedQuery&lt;RaBdrRating&gt;)entityManager.createQuery("
       SELECT r.activePackage,SUM(r.duration),SUM(r.charge),COUNT(r) 
       FROM RaBdrRating r WHERE r.callType = :callType 
       and r.startDate between :startDate and :endDate 
       GROUP BY r.activePackage",RaBdrRating.class);
  
  uQuery.setParameter("callType", model.getCallType());
  uQuery.setParameter("startDate",startDate);
  uQuery.setParameter("endDate",endDate);
  List&lt;RaBdrRating&gt; listOfPackages = uQuery.getResultList();
  </code></pre>
  
  <p>Can any one tell me what is wrong in my query.....I am new to JPA and i am not getting what is the problem and strucked up here.If any one have idea please tell me.</p>