Hi,
we found an issue updating rows with null values. While an insert will save null values (examle: {a: "hello", b: null}), an update will remove the field with null as value (example: {a: "hello"}, field b does not exist any more).
After investigating the code we found out that the function validFields(), which is called during update, filters field with undefined or null values.
While we are questioning if maybe it should be possible to store null values in the database it at least seems odd that null values are inserted but removed with updates.
Suggestion:
Change the line (in function validFields)
if ((data[field] !== null && data[field] !== undefined)) {
to
if (data[field] !== undefined) {
Hi, we found an issue updating rows with null values. While an insert will save null values (examle: {a: "hello", b: null}), an update will remove the field with null as value (example: {a: "hello"}, field b does not exist any more). After investigating the code we found out that the function validFields(), which is called during update, filters field with undefined or null values.
While we are questioning if maybe it should be possible to store null values in the database it at least seems odd that null values are inserted but removed with updates.
Suggestion: Change the line (in function validFields) if ((data[field] !== null && data[field] !== undefined)) { to if (data[field] !== undefined) {