我的模式有以下关系:
Program hasMany Classroom
Classroom belongsTo Program
What I am trying to achieve is to display all the classrooms, grouped by program, for example:
<><>Program 1
- 第1会议室
- 地图室2
- 地图室3
Program 2
- 第1会议室
- 地图室2... etc
我在教室内的指数行动 主计长:
function index() {
$this->Access->grantAdmin();
$this->Classroom->recursive = 1;
$this->set( classrooms , $this->paginate());
}
I tried to use this:
var $paginate = array(
group => program_id
);
但正如我所期望的那样,它没有工作。 任何想法? 增 编