1
Hello, I have a script that gets an ID by a POST notification along with other data. It turns out that the ID is from a transaction created on another system (Ids are not generated by auto_increment).
An example of data I receive would be:
{'id' : 1234, 'data' : '2014-06-02', 'etc' : 'teste'}
I create the array based on this json that I receive by POST.
$dados['Model'] = array(
'id' => $json->id,
'data' => $json->data,
'etc' => $json->etc
);
$this->Model->save($dados);
How to know if the save() method in the controller did an update or an Insert since the id is my Primary key?