-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hibernate problem with extreme small decimal
PostPosted: Tue Apr 07, 2009 9:21 am 
Newbie

Joined: Tue Apr 07, 2009 8:12 am
Posts: 1
An java object field with type BigDecimal, set value of 2.4727E-9. It's mapped to an Oracle table field with type of number(16,13).
After it's saved, I find the value in the DB table changes to 2.6424E-9.
It's strange that everytime I retrieve this DB field with hibernate into java BigDecimal, the values becoms small than 2.6424E-9.. And the value becomes smaller and smaller after it's retrieved multi-times.

When I change the object field type to double, this problem disappear.
This field will be used in a big financial system, the precsion is very important, the double type is not acceptable. This problem trouble me so much, any one can help me?

Thanks a lot


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.