java mapping for oracle number type
Posted
by
aauser
on Stack Overflow
See other posts from Stack Overflow
or by aauser
Published on 2012-07-01T21:09:10Z
Indexed on
2012/07/01
21:15 UTC
Read the original article
Hit count: 214
I have database with oracle number type. Could there any possible issues with using java Double
when updating table with numeric column. Should i switch BigDecimal
or Double
is approriate type.
As I fas as I know, BigDecimal
is used when arbitrary precision required, when deal with prices for example.
Consider simple API updatePrice(Double d)
Should i persist double as is or BigDecimal.valueOf(d)
is preferable ?
© Stack Overflow or respective owner