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

    Hi. I would like to use some models, which don't requires any tables (so I would like to set table name as null), and one model, which will use totally different table name from model name. However, I don't know how- could someone explain me?

    • CommentAuthorThijs
     

    Answer for your second question:

    .. and one model, which will use totally different table name from model name.

    You can use setTableName to do that. But I'm not sure how to use it. I guess in a contruct() method in your model file.

    function __construct()
    {
        $this->setTableName('yourCustomTableName');
    }
    
    • CommentAuthorkkrzyzak
     

    I'll try it for custom names, but it doesn't work with models which don't requires table (setting table name to null and false don't works, because of this piece of code in AkActiveRecord.php: function setTableName($table_name = null, (...) ) (..) if(empty($table_name)){ $table_name = AkInflector::tableize($this->getModelName()); }

    • CommentAuthorKaste
     

    what's the use-case for a so-called ActiveRecord without a table. which methods you would like to use then?