Ok... I got it! I'll make a test case for this, thanks!
on Fri, Apr 18, 2008 at 2:18 AM, Sourabh Sharma <[EMAIL PROTECTED]> > wrote: > > Hello, > > But I use that findAllThreaded its works fine for me. But we have to > only take care about parent id relationship. I followed the > instruction from manual. Or may be there is difference of versions. I > am using betaversion of cakephp. What kind of care? Could you explain? The only way to sort is putting "ORDER BY parent_id ASC"! []'s On Fri, Apr 18, 2008 at 3:30 AM, Adam Royle <[EMAIL PROTECTED]> wrote: > > It was closed because there was no reproducable test case attached to > the ticket. > > On Apr 18, 12:59 pm, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I was trying the method findAllThreaded and I have found a bug! > > I have been tested this in Cake 1.2, but problaly the bug is on 1.1 too. > > There is a table called sections (model Section) with id, parent_id, > > created, modified and name. > > > > When I try to sort this data with $sections = > > $this->Section->findAllThreaded(null, null, 'Section.name ASC'); the > result > > is only one Section, but there are 5. > > The only way to get all data is sorting by modified field. > > > > The problem is in: > > /** > > * Private, recursive helper method for findAllThreaded. > > * > > * @param array $data Results of find operation > > * @param string $root NULL or id for root node of operation > > * @param integer $index last processed index of $data > > * @return array Threaded results > > * @access private > > * @see Model::findAllThreaded() > > */ > > The way to fix it is dont keeping the last processed index, but the > > processeds indexes... I guess. > > > > There is a ticket invalidated by phpnut. Why? > https://trac.cakephp.org/ticket/3924 > > > > I opened the ticket with new information. > > > > -- > > Renan Gonçalves - Software Engineer > > Cell Phone: +55 11 8633 6018 > > MSN: [EMAIL PROTECTED] > > São Paulo - SP/Brazil > > > -- Renan Gonçalves - Software Engineer Cell Phone: +55 11 8633 6018 MSN: [EMAIL PROTECTED] São Paulo - SP/Brazil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
