I created a REST API in CakePHP 4.5, and all the ID fields are of type Bigint. Is there a way to force CakePHP to convert these fields to strings before returning the JSON?
There are many fields, and it would be impractical to edit each possible return function. I thought about defining this conversion in the EntityTable or the model.
Is that possible?
I tried this, but cake still returning id as INT
public function getSchema():TableSchema{
$schema = parent::getSchema();
$schema->setColumnType('id', 'string');
return $schema;
}