How is Agile enforcing Scale for NUMERIC values
Looking at the Agile API, it appears the Java type java.lang.Double is returned for Attributes which are of type NUMERIC. However, those types allow a Scale to be set. Double is a floating-point type, and thus has no precision. What is really happening here?
I am guessing that the database type is NUMBER, which means the internal data structure is BigDecimal which is then being returned as a Double. If that is the case, that’s unfortunate as Double is likely the worst format that can be used when dealing with numbers that have a Scale/Precision on them.
You are correct in that the database attribute data type is NUMBER for numeric attributes. As I understand it, the scale/precision is not enforced at the database level, but is instead just part of the attribute value display processing. The database internal format is not relevant, so long as it can handle values out to the limits of scale and precision that are supported by the application.