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

    I have a application_controller with the following setup:

    class ApplicationController extends AkActionController
    var $model = 'apilog';

    function _log($data) {

    Now, when I have a new controller:

    class Article extends ApplicationController
    var $models = 'someothermodel';


    Now that I used the $models variable, the "apilog" model is not loaded. So using $this->_log() does not work as expected.

    How can this be done more correctly without manually writing var $models = 'apilog,someothermodel'; in the extended class?
    • CommentAuthorinsanet
    mmmmm, does $model is a valid property???, i always used '$models'.

    anyways you could try to import that model in the application __construct with : AK::import('apilog')
    • CommentAuthorhaakon

    Thanks for your reply and suggestion, and sorry I had a mistyping in my post, it was of course $models i meant.

    I tried your suggestion, but got this error-message:
    Fatal error: Class 'ActiveRecord' not found in /home/haakon/apiserver/trunk/www/app/models/api_log.php on line 3

    I understand that it needs the shared_model.php class, but I would like to solve this problem in somewhat orderly manner, if there is one.
    • CommentAuthorKaste

    In fact model and models are valid. To keep you running I would suggest you simply add


    where it best fits.