MySQL database year(4) field named 'built_year’
CakePHP 3.3 form $this->Form->input(‘built_year’, [‘type’ => ‘year’, ‘minYear’ => 1900, ‘maxYear’ => date(‘Y’)]);
$this->request->data[‘built_year’] contains [‘year’ => ‘1973’] but saves to database as 0000.
It works if I manually set $this->request->data[‘built_year’] = $this->request->data[‘built_year’][‘year’] in my controller (by the time it gets to beforeSave in the model $entity[‘built_year’] = ‘’) but I shouldn’t have to do this. Should not year form type map correctly to year(4) fields in the database?