Good evening. Appreciate any effort to help me.
I use version 4 and I need to get the last insert id after I save the row in the database from the controller, in previous versions, there was a function
$orderId = $this->Orders->getLastInsertId();
in this version, it gives me a mistake,
It will have been added to whatever entity you just saved. But why do you need it? If it’s to add to other related entities, then you can save them all at once and Cake will take care of that for you.