I noticed when I was unit testing that when I was setting a reactor record field to zero (userrecord.setUsedFilespace(0)), and then saving the record, the database would not update the table’s value from null to zero.
Turns out, as Chris pointed out, that if a table has a column that allows nulls, any zero value will automatically be saved as NULL. So this column,of type bigint, had no way of getting a zero value into it through reactor, which would always set the zero value to null.
What we did was customize the userDAO. We changed the create and update methods. In the DAO folder of the project, the userDAO was edited. In the create and update methods we changed the code:
And this allowed the updates and creates to use zero values.