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

    Hi everyboby,

    i'm trying to implement a simple inheritance like that

    class Item extends ActiveRecord {}

    and

    class Book extends Item {}

    class Pencil extends Item {}

    In my database, i have only 2 tables books and pencils.

    When i call the listing action (on book or pencil) from my view , i have an error like "Fatal error: Ooops! Could not fetch details for the table items. in /../akelos-fwk/lib/AkActiveRecord.php on line 2617"

    Why Akelos try to access to the table items and it's possible to bypass that action ?

    Thank's

    Francois

    •  
      CommentAuthorriffed
     

    What is the point of extending the item class if they both have different tables?

    •  
      CommentAuthorfrancois
     

    Thanks Riffed for your help.

    Now it's working fine

    function __construct(){
         $this->setTableName('books');
         $attributes = (array)func_get_args();
         return $this->init($attributes);
    }
    

    Francois

    • CommentAuthorKaste
     

    I think this would be a one-liner, to make the single table inheritance optional. somewhere in ->getTableName ´if blah then´ ....