Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorkkrzyzak
    • CommentTimeMar 20th 2008
     

    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
    • CommentTimeMar 21st 2008 edited
     

    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
    • CommentTimeMar 21st 2008
     

    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
    • CommentTimeApr 17th 2008
     

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

Add your comments
    Username Password
  • Format comments as