* @since 1.0 */ class Search extends ActiveRecord { public static function tableName() { return '{{%full_search_product}}'; } public function beforeSave($insert) { foreach ($this->attributes() as $attr) { if (is_array($this->{$attr})) { throw new InvalidValueException('search model save fail, attribute ['.$attr. '] is array, you must serialize it before save '); } } return parent::beforeSave($insert); } }