Thanks for the reply.  I actually did kind of what you said.  I
abstracted my objects into a chainable object and then extended that.
It worked quite nicely and now I can use the useful methods in
TreeBehavior to get the data I need easily.

On Jun 18, 9:40 am, delocalizer <conrad.leon...@hotmail.com> wrote:
> Hi Greg;
> Yes my experience is that if it's not easily implemented with the core
> Tree behaviour then there is probably a better or at least alternative
> way to do it. Once (and only once) was I determined (desperate?)
> enough to have a heterogeneous model tree, and in that case I used a
> separate model with Tree behaviour just for the structure, with fields
> for the class name & UUID of the model object referred to by each
> node. Worked quite well but had to be careful to keep the the
> structure tree in sync with its models using callbacks so that adding/
> editing/deleting a model did likewise to the tree and vice versa
> Sounds like it all worked out for you anyway.
>
> cheers mate.
>
> On Jun 17, 8:28 pm, Greg Baker <greg.baker....@gmail.com> wrote:
>
> > Basically I wanted to create a chain of alternating objects.  For
> > example:
>
> > document-comment-document-comment-document-comment
>
> > Not really a tree I guess but I thought I could make use of some of
> > the tree behaviour to help me.  I've since come up with my own
> > solution so I don't have to use tree.
>
> > On Jun 9, 7:52 am, delocalizer <conrad.leon...@hotmail.com> wrote:
>
> > > Can you describe the context of the problem? ie. what is it that you
> > > want to achieve?
>
> > > On Jun 6, 1:38 am, Greg Baker <greg.baker....@gmail.com> wrote:
>
> > > > Is it possible to use TreeBehavior where parent_id points to an id in
> > > > another model, which also uses TreeBehavior?
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to