> > I've actually used this approach and gotten it to work and it works
> > great if each row in the database references only one parent row.
> > However, my issue is that one row in the database could have several
> > parents and several children.  That's why I have a join table.
>
> > Basically in my navigation there could be Item1 with a child of
> > Item2.  At the same time Item3 could have the child Item2 as well.
> > Therefore, Item2 has two parents.  Item2 could also have Item4, Item5,
> > etc as children and Item4 could be a child of Item1 etc.
>
> > That is the relationship that I'm trying to figure out with cake if
> > its possible.
>
> > Is there away around this using the code that Conners has posted that
> > I'm just not seeing?
>
> Hi Paul
>
> My mistake.  I was forgetting the join table (end of the week, late
> night etc).  But the approach is still the same.
>
> Use the same style of relationships, but add a join table in between.
> It is another way of producing a HABTM association.  Only you are doing
> it "manually".
>
> So:
>
>    table1 hasMany JoinTable
>    JoinTable hasMany table1
>
> (this is your child relationship)
>
> and
>
>    table1 belongsTo JoinTable
>    JoinTable belongsTo table1
>
> (this is your parent relationship)
>
> If you search this forum for info on "adding data to join tables" or
> similar, you will find this design discussed a number of times.
>
> Regards,
> Langdon

AH HA!  So that's what you do a search for! :)  Awesome!  I'll give
what you say a shot tomorrow but real quick. I don't need a model for
the JoinTable do I?

I'll see what I can do tomorrow and report back!

Thanks again!


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to