-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: EAP 5.0.0, 4.2.0.GA_CP08, 4.3.0.GA_CP07
-
Fix Version/s: EAP 5.0.1.CR1, 4.2.0.GA_CP09, 4.3.0.GA_CP08
-
Component/s: Hibernate
-
Labels:None
-
Environment:
mysql
-
Affects:Release Notes
Running the query "select round(stTmpRiepCap.imponibile,1), round(stTmpRiepCap.ritImponibile,1) from StTmpRiepCap stTmpRiepCap", it always returns an Integer and it always truncate the decimal part of Double number ("stTmpRiepCap.imponibile" and "stTmpRiepCap.ritImponibile" are "java.lang.Double").
Example
REAL VALUE - Imponibile: 1528.57 - Ritenuta imponibile 266.13
VALUE RETURNED USING ROUND - Imponibile: 1528 - Ritenuta imponibile 266
mysql document said :
http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_round
"The return type is the same type as that of the first argument (assuming that it is integer, double, or decimal). This means that for an integer argument, the result is an integer (no decimal places): "
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4769