Tuesday, September 29, 2009

Re: find('threaded') doesn't find any children

All you need for a threaded find is a Table.parent_id.

SVN FILE: $Id: model.php 8283 2009-08-03 20:49:17Z

line 2187

I never said it's the way you want it. I said it might be the way you
want it to work, which it obviously it is since you don't have any
issues with it, and it's not the way others want it to work.

I can't stand when someone asks about functionality and someone
responds with: That's not the way it works. Read the docs, blah blah
blah. Maybe instead of being a manual nazi, respond with a
modification that helps the original poster complete what they are
looking to accomplish.

George H, I suggest you write a custom method in your model that
utilizes parent_id and passes conditions of the custom find method
recursively to all the children finds.

On Sep 25, 2:25 pm, brian <bally.z...@gmail.com> wrote:
> On Fri, Sep 25, 2009 at 12:22 PM, Chris <ch...@thompsonbd.com> wrote:
>
> > This might be the way you, brian, want it to work, however, I am in
> > George's boat.  I expected this to pass the conditions to the children
> > find() calls and build the threaded list based on that.  Instead, it
> > does a simple find('all') with conditions, it doesn't actually do a
> > threaded find().
>
> Given that I've written exactly 0 lines of code for Cake's core, I'd
> say that it has nothing to do with what I *want*. I was simply
> pointing out that Cake was responding logically, given the supplied
> conditions.
>
> Again: AFAIK, 'threaded' is useless without setting the table up for
> MPTT ('lft' & 'rght' columns).
>
> http://book.cakephp.org/view/812/find-threadedhttp://articles.sitepoint.com/article/hierarchical-data-database/2http://dev.mysql.com/tech-resources/articles/hierarchical-data.htmlhttp://bakery.cakephp.org/articles/view/modified-preorder-tree-traver...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: