Hi cannot update a model that have composite key.
i’m using
array('id_projeto+id_utilizador', 'application.extensions.uniqueMultiColumnValidator', 'message' => 'Utilizador já está associado a projeto'),
and when update id_project ,ok
when update id_utilizador or other field, i get the error message.
this is the action
public function actionUpdate($idproj,$iduser) {
$model = $this->loadModel($idproj,$iduser);
if (isset($_POST['UtilizadorProjeto'])) {
$model->attributes = $_POST['UtilizadorProjeto'];
if ($model->save())
$this->redirect(array('view', 'idproj' => $model->id_projeto,'iduser'=>$model->id_utilizador));
}
$this->render('update', array(
'model' => $model,
));
}