I have a number of non-nullable fields in my database, for which I have provided default values. For example:
invest_poc_id int(11) NOT NULL DEFAULT 0
When I debug in my
edit method, I see the default value upon page load.
'invest_poc_id' => (int) 0`
Field is marked dirty after post.
However, upon POST, the value is
null and the default value of the field is ignored. I don’t want to make this field nullable, nor do I want to disable strict mode in my application. What can I do to make my app recognize the default value of these fields?