On Dec 12, 3:08 am, AJ <[EMAIL PROTECTED]> wrote:
> I searched through the list and could not find anyone having this
> specific issue.
>
> I am using 1.2 (not exactly sure what version, but not pre-beta). I
> have a table of content pages, which includes a parent_id field. I am
> trying to pull a threaded array like this:
>
> $test = $this->findAllThreaded(array('Content.section_id'=>'1'));
looking at the way findAllThreaded and __doThread are written
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/model.php#L1729
If your resultset does not contain the a node with no parent, it won't
work.
You can work around it be overriding the findAllThreaded method and
passing the $root parent id to the doThread method OR using a findAll
and passing the results through __doThread (with the id of the parent
to use as a base as the 2nd param) OR writing a constriant that will
not exclude the top level node.
Youd be better off IMO getting familiar with and using the tree
behavior though
hth,
AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---