title: spring-data @Query mapping result issue
body: <p>I've created a Repository that extends CrudRepository,
  this repository has a method with an @Query notation:</p>
  
  <p>Code:</p>
  
  <pre><code>@Query("select itemType, count(*) as count from Item where  User_id = :userId group by itemType")
  List&lt;Map&lt;String, Long&gt;&gt; countItemsForUser(@Param("userId") Long userId);
  </code></pre>
  
  <p>The issue I'm having is that this return a ArrayList of Object(s) and not a List of Map.
  I've read somewhere that JPA can't return a Map so that's why I stuff the result in a List>.</p>
  
  <p>I don't know what's the best way to work around this issue or to quickly access the result data. 
  I've tried casting but that didn't work out either:</p>
  
  <pre><code>for(Object item: items) {
      Map&lt;String,Long&gt; castedItem = (HashMap&lt;String,Long&gt;)item;
  }
  </code></pre>