#5642: Model::_findThreaded should be more cautious about dropping top level
results
-------------------------------+--------------------------------------------
Reporter: edmnc | Type: Bug
Status: new | Priority: Medium
Milestone: | Component: Model
Version: | Severity: Normal
Keywords: | Php_version: PHP 5
Cake_version: 1.2.0.7692 RC3 |
-------------------------------+--------------------------------------------
The current situation (since RC3) is that "top level results with
different parent_ids to the first result will be dropped"
This means that it only takes one wrong record at the beginning of
resultset to lead to empty results. My case was with a big category tree
(>500 records) which has multiple top level records with parent_id=0.
Adding a new record with nonexistent parent_id and high sorting priority
meant that the category tree was empty.
Perhaps _findThreaded should not drop any records at all? I think that
would be safer to assume that all records that don't have an existing id
are top level records. Or maybe there could be some intelligence, that the
record with least children or no children are dropped (although this would
obviously complicate/slow down things a lot)
--
Ticket URL: <https://trac.cakephp.org/ticket/5642>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets 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/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---