I have a CActiveRecord model, Job which has a public property $completionChoice.
It doesn't relate to a databasefield, and I don't have getter or setter methods for it. I use it as a flag for some processing during beforeSave()
What I'd like to be able to do is massively assign from the form, so have $_POST['completionChoice'] automatically get assigned to it when I do $job->attributes() = $_POST['Job'], however I can't get it working.
I've tried setting $completionChoice as safe, and I've tried overriding CActiveRecord::attributeNames() to add it, but it doesn't get assigned.
How do I do this?
Thanks
Iain
It doesn't relate to a databasefield, and I don't have getter or setter methods for it. I use it as a flag for some processing during beforeSave()
What I'd like to be able to do is massively assign from the form, so have $_POST['completionChoice'] automatically get assigned to it when I do $job->attributes() = $_POST['Job'], however I can't get it working.
I've tried setting $completionChoice as safe, and I've tried overriding CActiveRecord::attributeNames() to add it, but it doesn't get assigned.
How do I do this?
Thanks
Iain