openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From holod <serega.shey...@gmail.com>
Subject Re: Can;t map AVG sql field to class
Date Tue, 25 Nov 2008 07:25:04 GMT



Pinaki Poddar wrote:
> 
>   So try something like:
>    Query query  = em.createNativeQuery(sb.toString());
>    Object result = query.getSingleResult();
>    InformerRow ir = new InformerRow();
>    ir.s5 = ((Number)result).intValue();
> 

I've tried to do define s5 as Number, I've created constructor 
InformerRow(Number s5){
    this.s5 = s5;
}

but it didn't help.

So, I'll try your solution, I'm not sure it will help.
Anyway thank you for your help!


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


Mime
View raw message