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.

No Files Were Attached
afinnell Agile User Asked on January 15, 2019 in Other APIs.
Add Comment
2 Answer(s)

Did you find an answer?  If yes, what were your findings?

Patrick Lawrence Agile Angel Answered on May 7, 2019.
Add Comment

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.

Kevin Cummings Agile Angel Answered on May 8, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.