title: Convert JPA query.getResultList() to MY Objects
body: <p>I'm performing a Query to my DB in <strong>JPA</strong>. The Query "queries" 4 tables, and the result aggregates columns from that different tables.</p>
  
  <p>My Query is something like:</p>
  
  <pre><code>Query query = em.createQuery("SELECT o.A, o.B, o.C, e.D, c.E FROM Table1 o, 
  Table2 i, Table3 e, Table4 c WHERE o.X = i.X AND i.Y = e.Y AND i.Z = c.Z");
  </code></pre>
  
  <p>How can I get the query result and extract the different fields? </p>
  
  <p>I created a class (MyObject) that represents each item of the result list, and I want to <strong>convert the query.getResultList() into a List&lt; MyObject></strong>.</p>
  
  <p>How can I do it?</p>