Be able to map Double property to 'decimal(p, s)' instead of 'double precision'

Hi, currently for a Double property, it is mapped as double precision column in postgreSQL. For BigDecimal the expected decimal/numeric(p,s) column is used. It would be nice to be able to map a double to a decimal column, especially when you can define a @Digits validation rule for a double that expresses clearly the intent.

I would suggest for Double property in Studio to keep the BigDecimal front-end where you can define precision and scale. If these are defined for a Double then a @Digit validation rule is generated and we should be able to choose to use decimal/numeric column or double precision (which is faster). If not defined, no validation rule and column is a double precision by default.

Hi Michael,

What would be a benefit of such complication? Why not just use BigDecimal when you need a number with certain precision and scale?

BTW in 6.6 you can use Column definition field in Studio to define your own DDL for a column:

Because computations with BigDecimal are much slower than double, in terms of memory used and processing time. With appropriate rounding at appropriate times, the small precision loss is negligible (for us).

Yes we use column definition, but our model is huge, the most Studio can help, the most time we save. Additionnaly, you can currently define a @Digits rule that is inconsistent with the specific DDL. At least Studio could rise a warning in that case, but ideally one would define the precision and the type wanted, then Studio would generate the @Digits rule and DDL fields, that could be overriden.