Getting form data to a CActiveRecord model works for one model but not for another

I’m getting a submitted form in this way:


$resume->attributes = $_POST['ResumeModel'];

$profile->attributes = $_POST['UserProfile'];

Both CActiveRecord models are correctly populated before this from the corresponding tables, they have the correct data and all.

Both models’ data is present on $_POST as modified by the form.

But it seems that the assignment to the attributes property works only for $profile and not for $resume.

If I check their values after that assignment, $profile doesn’t get the edits from the form.

Is there something in the definition of the model that can cause that? As far as I can see, both models are similarly implemented

I don’t understand why this happens, does anyone have a clue?

Thanks!

Safe attributes maybe?

http://www.yiiframework.com/doc/guide/form.model#securing-attribute-assignments

Indeed, thanks!