I have an issue about inserting many records (getting from json format)
Here is my code
for ($i = 0; $i < count(($json[“articles”])); $i++)
$detail = $this->Details->newEmptyEntity();
$detail->idScan = $idScan;
$detail->ean = strval($json[“articles”][$i][“ean”]);
$detail->qty = intval($json[“articles”][$i][“qte”]);
I have three records and it only save 1 record.
I tried to debug by displaying all $detail->ean in the loop and it works.
Do you have any ideas ?
Thanks in advance.