Unfortunately, setting $this->MyModel->recursive = -1; doesn't help :(
My code is the following:
function _sort($id = null) {
$this->CompanyCategory->recursive = -1;
$this->CompanyCategory->reorder(array (
'id' => $id,
'field' => 'name'
));
$miscs = $this->CompanyCategory->findAllBy
I've had a tree with that many records and had no issues re-ordering
it (maybe 1-2 seconds max).
I seem to remember needing to set $this->MyModel->recursive = -1;
before calling the reorder methods. Maybe that is your problem - you
might be selecting more than you need to?
Maybe you should show
Hello,
I have a tree with about 400+ records and when I try to call reorder method
it executes about 10 SQL queries and takes several minutes to finish. Is
there any way to optimize it?
Thanks!
--
Пётр Шевцов
--~--~-~--~~~---~--~~
You received this message b