title: hibernate convert two table result with alias as property
body: <p>when i use hibernate query two tables.</p>
  
  <pre><code>SQLQuery query = session.createSQLQuery("select {a.*},{b.*} from a,b where 
  a.id=b.id");
  query.addEntity("a",A.class);
  query.addEntity("b",B.class);
  List list = query.list();
  </code></pre>
  
  <p>the list may convert to json as this  </p>
  
  <pre><code>[
   [{id:1,aa:"aa"},{id:1,"bb":"bb"}],
   [{id:2,aa:"aa2"},{id:2,"bb":"bb2"}]
  </code></pre>
  
  <p>]</p>
  
  <p>can hibernate query list get result like below</p>
  
  <pre><code>[
    {
      a:{id:1,aa:"aa"},
      b:{id:1,"bb":"bb"}
   },
    {
      a:{id:2,aa:"aa2"},
      b:{id:2,"bb":"bb2"}
    }
  ]
  </code></pre>