Skip to content

Instantly share code, notes, and snippets.

@jaredhoyt
Created November 1, 2010 14:59
Show Gist options
  • Save jaredhoyt/658293 to your computer and use it in GitHub Desktop.
Save jaredhoyt/658293 to your computer and use it in GitHub Desktop.
Pagination with sorting on deep associations
$this->paginate = array(
'limit' => 50,
'conditions' => $conditions,
'contain' => array(
'ExceptionWorkflowLog',
'Procedure(id,cpt,expected_amount,allowed_total,difference_amount)',
'Procedure.Claim(id,number)',
'Procedure.Claim.Group(abbr)'
)
);
$this->set('exceptions', $this->paginate('PaymentException'));
<?php echo $paginator->sort('Claim #', 'Claim.number'); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment