ok here is how you should do that create you category table first
then create your product table in the product table just include category_id then you can do product belongs to category or cake bake it it will ask you what model associations let me know how you did On Jun 4, 6:45 am, Beedge <[email protected]> wrote: > Hi all, about to start on my first cake project. A straight forward e- > commerce site. > I am not used to having to visualise my database relationships so I > was hoping for a little help. > > A product belongs in a category > A product can be in many categories > A Category has Sub categories > > Is this just a HABTM relationship between products and categories? > > I will be using tree behavior for my categories. > > Any comments on this or helpers? I would love to find a tutorial that > covered this, but all I can really find is blog tutorials! > > Thanks in advance > > Kev --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
