Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring returns a BigDecimal for an Integer RDBMS Column  RSS feed

 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring returns a BigDecimal for an Integer RDBMS Column
======================================

"Spring Recipes (covers Spring 3)" page 599 uses a Derby table named
Vehicle with a column : WHEEL INT.

On page 615 the JDBC method
is used with "SELECT * FROM VEHICLE" and within the iteration of the list of maps
there is this line :

All the above looks fine to me - a java.lang.Integer is returned.

But when I try using Oracle XE 11.2.0 table EMP column EMPNO NUMBER(4) a BigDecimal is returned.
(In oracle NUMBER allows both a precision and a scale).

What exactly is going on ? Thank you for any help.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!