I recently started using Kohana, and I know that inheritance is in its infancy stage at the moment. The work around uses the annotation $ _has_one for the model of the child class. In case I have a "page" as the parent of the "article". I have something like:
protected $_has_one = array('mypage'=>array('model'=>'page', 'foreign_key'=>'id'));
In my controller, I have an action that queries the database. In this query, I am trying to access the fields from the parent element "article", which is the "page".
$n->articles=ORM::factory('article')->where('expires','=',0)
->where('articledate','<',date('y-m-d'))
->where('expirydate','>',date('y-m-d'))
->where('mypage->status','=','PUBLISHED')
->order_by('articledate','desc')
->find_all();
The status column is in the page table, and my request generates an error in the action "cannot find the status", obviously, because it belongs to the parent element.
Any ideas?