I’ve implemented sort links using PaginatorHelper::sort()
as explained in docs. It works but it only sorts by that column. That means that when the chosen column is not unique CakePHP runs pagination queries that do not have a deterministic order, e.g.:
ORDER BY `Vehicle`.`make` asc LIMIT 20, 20
It’d a very obvious bug to go unnoticed so I’m wondering if I’m doing something wrong. My links are like:
<th><?php echo $this->Paginator->sort('Vehicle.make', __d('foo_manager', 'make')); ?></th>
… and I haven’t added any specific sort code to the controller.