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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 [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 -~----------~----~----~----~------~----~------~--~---
