I need to patch an entity using
but the field from the request come in camelcase, is there any automapper in cake php 5 To make it works because my entity is in snake_case
patchEntity($city , $data);
class City extends Entity
{
/**
* Fields that can be mass assigned using newEntity() or patchEntity().
*
* Note that when '*' is set to true, this allows all unspecified fields to
* be mass assigned. For security purposes, it is advised to set '*' to false
* (or remove it), and explicitly make individual fields accessible as needed.
*
* @var array<string, bool>
*/
protected array $_accessible = [
'name' => true,
'zip_code' => true,
'region_code' => true,
'department_code' => true,
'deleted' => true,
'department_id' => true,
'updated_at' => true,
'created_at' => true,
];
}