How is that, when I try to choose my columns in my query, I can't get the relationship virable? But if i dont choose any columns, it works - But then I can't set the LeftJoin data..
$categories = Self::query()
->columns(array('data as a.data'))
->leftJoin('Models\BlogsPostCategories', 'a.blogcatid = Models\BlogsBlogCategories.id', 'a')
->where('blogid = :blogid:', array('blogid' => $session['blogid']))
->orderBy('Models\BlogsBlogCategories.id DESC')
->execute();
public function initialize()
{
$this->hasOne('catid', __NAMESPACE__ . '\BlogsCategories', 'id', array(
'alias' => 'info',
));
}
Hope you understand