メモ
<?php
public class UsersController extends AppController {
public $paginate = array (
'User' => array (
'limit' => 20,
'order' => 'User.id',
'fields' => '*',
'joins' => array (
array (
'type' => 'LEFT',
'table' => 'roles',
'alias' => 'Role',
'conditions' => 'Role.id = User.role_id'
)
)
),
"Role" => array()
);
public function index($type = "all") {
$this->request->list = $this->paginate ("User");
}
}