try adding `._joinData’ to associated as in
https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-additional-data-to-the-join-table
$student = $this->Students->newEntity($data, [
'associated' => ['Courses._joinData']
]);
try adding `._joinData’ to associated as in
https://book.cakephp.org/3.0/en/orm/saving-data.html#saving-additional-data-to-the-join-table
$student = $this->Students->newEntity($data, [
'associated' => ['Courses._joinData']
]);