File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Spring returns a BigDecimal for an Integer RDBMS Column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring returns a BigDecimal for an Integer RDBMS Column" Watch "Spring returns a BigDecimal for an Integer RDBMS Column" New topic
Author

Spring returns a BigDecimal for an Integer RDBMS Column

Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring returns a BigDecimal for an Integer RDBMS Column
 
Similar Threads
Mixing of code - raw and generic
Cannot get new screen to work properly; similar screen was recently added successfully
JSP attendance management project error
Invalid number specified in a numeric field
Getting a resultSet from a CallableStatement