In my UsersHABTM app Solicitations.
After saving the form with, $this->Solicitation->save($this->request->data)I need to add another value user_idto the query table.
$data[] = array('User' => array('id' => 5), 'Solicitation' => array('id' => 77));
$data[] = array('User' => array('id' => 6), 'Solicitation' => array('id' => 77));
$this->Solicitation->saveMany($data);
My $data:
array(
'User' => array(
'id' => (int) 6
),
'Solicitation' => array(
'id' => '54'
)
)
I need to save the association on the form, and then add the new record above to the table solicitations_users. It saves only 6, not the data from the form. It just keeps the form if I delete the second one save.
I realized that in the DB this jumps alone id. It should be 'id' 36 => 5; 'id' 37 => 6. This seems to be a table update.
Here is the request:

source
share