Hi,
an CActiveForm includes textfields and checkboxes.
If the user submits (using POST) the form, the data-processing starts: $model->validate and (if validation is true) $model->save().
(Unfortunately) The form puts the selected values of an checkbox into an array (by default).
So if i use $model->save(); the method doesn’t serialize the array and simply writes “ARRAY” into the mysql column.
Is there any Yii feature to solve this behaviour?
Or may I have to use onBeforSave() to serialize and onAfterFind() to unserialize?
2nd question: one database column is an "timestamp". So mysql has to set the current timestamp if an record is inserted. Using $model->save() also writes the timestamp, even it is empty (results in: 0000-00-00 00:00:00).
Is there a way to avoid the writing of special/specific columns?
Thank you!
Best regards,
rall0r