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.

I folowed the instruction from this

http://docs.cakephp.nu/discuss/show/Model/findAllThreaded

Thanks
Sourabh Sharma

Renan Gonçalves 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

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to