Hi,
  The source of the problem seems to be
   > Query query = em.createNativeQuery(sb.toString(), InformerRow.class);

  Your query returns s5 - a Number. 

  While the above code is saying that the query result is an instance of
InformerRow.
 
  So try something like:
   Query query  = em.createNativeQuery(sb.toString());
   Object result = query.getSingleResult();
   InformerRow ir = new InformerRow();
   ir.s5 = ((Number)result).intValue();

-- 
View this message in context: 
http://n2.nabble.com/Can-t-map-AVG-sql-field-to-class-tp1562523p1563189.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to