Hi Paul > Basically, I have a navigatation system that is in a tree view. > However, I want to set it up where leaf nodes can have many different > parents.
Assuming that leaf nodes can have many parents, and that leaf nodes can have many children, then the structure that you are proposing is basically correct. I would set this up with the following relationships: Tabel 1 HasMany Children (using "Children" for the relationship name, but setting the class name for the relationship to "Join Table" and specifying the foreign key as "Table 1 Id") Table 1 BelongsTo Parent (using "Parent" for relationship name, but setting the class name for the relationship to "Join Table" and specifying the foreign key as "Table 1 Parent Id") When you retrieve a record from Table 1 with recursion on, Cake will automatically retrieve both related parents and children. Check out the Cake manual's model section for more details on both HasMany and BelongsTo relationship types and recursion. Hope this is useful. Regards, Langdon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
