 Query q = em.createNativeQuery(
       "SELECT o.id AS order_id, " +
           "o.quantity AS order_quantity, " +
           "o.item AS order_item, " +
         "FROM Order o, Item i " +
         "WHERE (order_quantity &gt; 25) AND (order_item = i.id)",
       "OrderResults");

   &#064;SqlResultSetMapping(name="OrderResults",
       entities={
           &#064;EntityResult(entityClass=com.acme.Order.class, fields={
               &#064;FieldResult(name="id", column="order_id"),
               &#064;Field