In the past, I have always rounded decimal places before saving them to avoid errors.
My colleague has now written data into a foundset without rounding beforehand and in my opinion it should be a bug in Servoy:
We have an SQL database with a numeric field (17.5). So only 5 decimal places are allowed.
In Servoy I can assign the value 0.23456789 and I can see the value in the result list. Normally the value should be truncated or set to a fixed value as specified in the database, I think.
Example:
=>databaseManager.setAutoSave(true)
true
=>forms.xyz.foundset.curr_factor_eur = 0.23456789
0.23456789 <---- FALSE, must be 0.23457
=>var fs1 = datasources.db.boss_sql.table1.getFoundSet()
=>fs1.loadAllRecords()
true
=>fs1.curr_factor_eur
0.23456789 <---- FALSE, must be 0.23457
=>databaseManager.refreshRecordFromDatabase(fs1,1)
true
=>fs1.curr_factor_eur
0.23457 <---- CORRECT
Is it intentional and he actually has to use .fixed() before inserting it to the foundset or is it a bug?