However, both the Oracle 8 and the Oracle 10 interfaces still have bugs regarding decimal numbers.
With Oracle 8, the bug is related to locale-specific representation. When reading numbers with decimal places, oracle uses the locale-specific decimal separator in the row buffer ($, in our case). However, the AbtOracle8DecimalField class uses a method (ScaledDecimal>>fromString:) which always expects a decimal point ($.)
This is our workaround (using the abrFromString: method which uses locale information):
- Code: Select all
valueInRecord: aRecord parentOffset: anOffset
" Return the contents of the character array beginning at anOffset as a
platform String "
^((self scale) = 0)
ifTrue: [(aRecord data abtCharArrayAt: anOffset + offset length: self baseLength ) asNumber]
ifFalse: [ScaledDecimal abrFromString: (aRecord data abtCharArrayAt: anOffset + offset length: self baseLength ) ]
In the Oracle 10 interface, support for decimal digits is entirely non-existing! All numeric fields are mapped to AbtDatabaseLongIntegerField, which can not handle decimal digits at all.
This does not look well-tested at all... Is there a fix in the pipeline?
For the time being, we'll use the Oracle 8 interface with our fix.