I'm new to CakePHP, but I find it very easy to use so far. Today I ran into the problem of exporting data from db.
I export 1 of my models as JSON. Everything is going fine, except that I noticed that CakePHP exports the id column as a string. The model is defined as int in mysql. I checked both the JSON output and the model, -
var_dump($this->Post->findById($id));exit;
and also in the model id is defined as a string.
This is due to other systems that rely on this JSON output, which are used to get an integer as an identifier.
I tried to set the $ _schema attribute in the model, but that didn't change anything.
I would be grateful for your help.
Thanks Dan
source share