Can I auto-serialize model fields with array type values before saving and auto-deserialize before fetching?
class MyModel extends \Phalcon\Mvc\Model
{
public $x;
}
$my = new MyModel;
$my->x = ['abc'];
$my->save();
//...
$my = MyModel::findFirst(1);
var_export($my->x); // array ('abc')
Of course, I can use serializing logic in setters and deserializing one in getters or do it in controller but this is not what I want. I use MySQL as DB.