Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorhaakon

    In the Akelos documentation, it states that you can define var $serialize = 'meta';
    Then the meta field will automatically be serialized before saving to the database.

    I tried this, made a text field called meta, and defined it as serialize in the model.
    But in the console, when I try it out:
    >>> $user->meta['color'] = 'blue';
    >>> $user->save();
    Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /root/uskyldig/trunk/akelos/lib/AkActiveRecord/AkDbAdapters/AkMysqlDbAdapter.php on line 80

    So as you can see, it doesn't try to serialize before trying to add the data to the database.

    This should be fixed on rev.Fixed on rev.1251