- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2012 07:20 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2012 11:21 AM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2012 06:55 AM
When you say "it saves", what do you mean? How are you setting this value? What widget type are you using if you're setting this via a form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2012 11:05 AM
In Studio, I creates a document type "XXX" with a field "Floating Point" (my_field).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2012 11:21 AM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2012 11:44 AM
Thank you very much ! I altered the column and it works !
