I'm using the version 1.2. When I try to order the pagination by a
field that is not in any table, for example, "SUM(Model.field) AS
new_field", the pagination isn't ordered by this new_field. It happens
because in the file cake/libs/controller/controller.php, line 1017,
the expression $object->{$alias}->hasField($field) is false in that
case. We have changed this file, at the line 1021:
}else{ //line 1021
foreach ($this->paginate[$alias]["fields"] as
$columnName){
if(preg_match("/\b$field\b$/", $columnName)){
$options['order'][$field] = $value;
break;
}
}
}
Perhaps there are better solutions for this problem. I hope you
understand my english. Thank you.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en