I later on made a github request for that, but the bigger problem is that I cannot find a good workaround for that.
Imagine you need a numeric field (quite often situation): the Seblod field is a text one (there is no numeric field) but the DB column is created as a number (e.g. a float).
The problem is when a field value is not filled in the content form: Seblod would store the zero value in the DB that is wrong since an empty value should be stored as NULL number, not as zero.
Waiting for a possible future native feature on this, I created a beforeStore field that when intercepts a field with empty value, it changes the value to the NULL value.
$fields['myfield']->value = NULL;
$config['storages'][$fields['myfield']->storage_table][$fields['myfield']->storage_field] = NULL;
Very strangely this works only on creation and not on edit: when I create a new content item and leave the numeric field empty, the beforeStore does its job and a NULL value is stored into the DB instead of a zero.
BUT... if I edit that item, fill the the field with any value like 1, save the item, then edit again the item clearing the value in the form: the beforeStore field replaces the empty string with a NULL value but Seblod does not store that NULL and leaves the 1 in the DB...
I checked with error_log tracing that beforeStore is correctly executed.
How to tell Seblod to store a NULL value for a numeric field?
Thanks a lot
Giuse