In cakephp 2, while updating a table in a loop, to reset table id and data, I was using create and then making a save. http://book.cakephp.org/2.0/en/models/saving-your-data.html#model-create-array-data-array
$data = array('username' => usernameArray[$i], 'age' => $ageArray[$i] );
$this->Mytable->create();
$this->Mytable->save($data);
Is there an equivalent function in Cakephp 3's new ORM, or does new database system handles this automatically ?
To use remaining code I will use this code in a loop. Do I need a create function ?
$data = array('username' => usernameArray[$i], 'age' => $ageArray[$i] );
$tableInstance = TableRegistry::get('Mytable');
$entity = $tableInstance->newEntity($data);
$tableInstance->save($entity);