$categs = Model_Categ::find('all', array ( 'related' => array ('articles'), 'offset' => Pagination::$offset, 'limit' => Pagination::$per_page, 'where' => array( array('user_id', '=', $this->user_id), ), ));
protected static $_many_many = array('articles');
'related' => array('articles', array('join_type' => 'inner'))to see if anything revealing happened; the app crashed with:
UnexpectedValueException [ Error ]: Relation "1" was not found in the model. 461 else 462 { 463 $rel = call_user_func(array($this->model, 'relations'), $relation); 464 if (empty($rel)) 465 { 466 throw new \UnexpectedValueException('Relation "'.$relation.'" was not found in the model.'); 467 } 468 } 469 470 $this->relations[$relation] = array($rel, $conditions); 471 Backtrace PKGPATH/orm/classes/query.php @ line 442 PKGPATH/orm/classes/query.php @ line 114 PKGPATH/orm/classes/query.php @ line 31 PKGPATH/orm/classes/model.php @ line 436 PKGPATH/orm/classes/model.php @ line 390 APPPATH/classes/controller/categs.php @ line 28 COREPATH/classes/request.php @ line 443 DOCROOT/index.php @ line 38
// This: 'related' => array('articles', array('join_type' => 'inner')) // Should be: 'related' => array('articles' => array('join_type' => 'inner'))
It looks like you're new here. If you want to get involved, click one of these buttons!