using pagination_helper with include option, search for including model's column.
at that time in PaginationHelper::_getOrderFromAssociations() uses AkActiveRecord::getAvailableAssociates(), it dones not implement.
and maybe it seems to have some problems.
I make patches.
My environment is:
WinXp?, Xampp1.5.5 apache2.2.3,PostgreSQL8.2, PHP5.2.0
Model:
User
$this->createTable('users', "
id,
name text,
kana text,
login text,
number text,
email text,
mobile text,
enabled integer,
user_type_id,
created_at,
updated_at
");
class User extends ActiveRecord
{
var $belongsTo = 'user_type';
}
UserType:
{{{
$this->createTable('user_types', "
id,
name text,
created_at,
updated_at
");
}}}
user_controller:
function listing()
{
$this->user_pages = $this->pagination_helper->getPaginator(
$this->User,
array(
'items_per_page' => 10,
'include' => array('user_type'),
)
);
$this->users = $this->User->find('all', $this->pagination_helper->getFindOptions($this->User));
}