How can i get video from BlogsPostsMeta, and check if its true or not? Note, this is BlogsPosts that is in a relationsship with BlogsPostsMeta.
*Unknown model or alias 'meta' (11), when preparing: SELECT [Models\BlogsPosts]. FROM [Models\BlogsPosts] WHERE meta.video = ?1 ORDER BY id DESC LIMIT :APL0: OFFSET :APL1:**
public function initialize()
{
$this->belongsTo('id', __NAMESPACE__ . '\BlogsPostsMeta', 'postid', array(
'alias' => 'meta'
));
}
$posts = BlogsPosts::find(
array(
'conditions' => 'meta.video = ?1',
'bind' => array(1 => '1'),
'limit' => $limit,
'offset' => $offset,
'order' => 'id DESC'
)
);