I think there is a bug in the insertOrUpdate function.
I have a field in the table where I'm inserting te record that is autoincrement and pk.
With this code:
if ($existing_participante_id > 0){
$insert_array['participante_id'] = $existing_participante_id;
}
$insert_array['tippart'] = 'E';
$insert_array['catsalut'] = $data['catsalut'];
$insert_array['nompart'] = $data['nompart'];
$insert_array['apellido1'] = $data['apellido1'];
$insert_array['apellido2'] = $data['apellido2'];
$insert_array = $participante->insertOrUpdate($insert_array);
I don't get returned the generated autoincrement in $insertarray
on the other hand, if I do it like this:
if ($existing_participante_id > 0){
$insert_array = $participante->updateRecord($insert_array);
}else{
$insert_array = $participante->insertRecord($insert_array);
}
the autoincrement is returned in $insert_array