You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by vinays84 <vi...@hotmail.com> on 2007/07/13 02:11:48 UTC

Mapping Oracle Number to JavaBean property

I have queries set up that do basic arithmetic (SUM(), addition, division) on
columns of type Number (working in an Oracle environment). I assume the
resultant columns would also be of the type Number. I would like to map
these columns to fields in a JavaBean with the primitive type double,
however I always seem to get IllegalArgumentErrors no matter how I configure
the jdbcTypes and javaTypes in the resultMap. I've tried:
jdbcType="NUMERIC"
jdbcType="NUMERIC" javaType="double"
jdbcType="DOUBLE"
jdbcType="DOUBLE" javaType="double"
jdbcType="DECIMAL"
jdbcType="DECIMAL javaType="double"
..nada. I can get it to work if I use jdbcType="DECIMAL" and change my
JavaBean fields to type BigDecimal, but I'd prefer to keep them the
primitive double type and not have to resort to later calling the
doubleValue() method of BigDecimal. 
Is this feasible and if so, what am I doing wrong?

Thanks!
-- 
View this message in context: http://www.nabble.com/Mapping-Oracle-Number-to-JavaBean-property-tf4071595.html#a11571184
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.