Create a decimal field
Hello,
I want to create a decimal field for a document. I try “integer” but I can just write an integer … Then, I try “floating point” but even if I write “35.68”, it save “35.0”.
How can I do it ?
Thanks in advance for your help
I just tested, and had no issue. I guess since you started with an “int” type, the database was initialized to store an integer for this field. When changing it to a “floating point” after, i see the following error in logs:
ERROR [org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper] SQL type mismatch for "FILE_SCHEMA"."MYINTOTBEFLOAT": expected 8, database has -5 / BIGINT (19)
So i guess you just need to drop your test database for this to be working as expected (or to alter the database column if you'd like to keep your current data)
Then I creates a new document "XXX" with my_field = 35.68 and I saves. I reload this document and in the field "my_field" there is 35.0 (instead of 35.68).
What is wrong ?
Thanks in advance