When I have a model/mapper for a mysql table with a boolean that is not nullable but has a default value of "0", the model fails Gacela's 'NULL' validation rule unless I specifically set the field value.
This doesn't work:
// This example table has field is_admin which is a TINYINT(1) NOT NULLABLE dafault "0"
$m = new User_Model;
$m->save([
'username' => $username
]);
On develop branch
When I have a model/mapper for a mysql table with a boolean that is not nullable but has a default value of "0", the model fails Gacela's 'NULL' validation rule unless I specifically set the field value.
This doesn't work:
This does:
I haven't explored whether this happens for other non-nullable field types with default values.