title: how to groupBY using spring data
body: <p>hi i'm using spring data in My project and I'm trying group by two fields, heres the request:</p>
  
  <pre><code>@Query( "SELECT obj from Agence obj GROUP BY obj.secteur.nomSecteur,obj.nomAgence" )
    Iterable&lt;Agence&gt; getSecteurAgenceByPc();
  </code></pre>
  
  <p>but it doesnt work for me..what i want is this result:</p>
  
  <pre><code>-Safi
    -CTM
      CZC1448YZN
      2UA13817KT
  
  -Rabat
    -CTM
      CZC1349G1B
      2UA0490SVR
    -Agdal
      G3M4NOJ
  
  -Essaouira
    -CTM
      CZC1221B85
    -Gare Routiere Municipale
      CZC145YL3
  </code></pre>
  
  <p>What I get is</p>
  
  <pre><code>{
      "status": 0,
      "data":
      [
          {
              "secteur": "Safi",
              "agence": "CTM"
          },
          {
              "secteur": "Safi",
              "agence": "Dep"
          },
          {
              "secteur": "Rabat",
              "agence": "Agdal"
          },
          {
              "secteur": "Rabat",
              "agence": "CTM"
          },
          {
              "secteur": "Essaouira",
              "agence": "CTM"
          },
          {
              "secteur": "Essaouira",
              "agence": "Gare Routiere Municipale"
          }
      ]
  }
  </code></pre>