I has the same question/problem the other day and nate came to the rescue.
--> http://groups-beta.google.com/group/cake-php/browse_thread/thread/44f343a620af343d Hopefully that helps. Nate is the man! :) - J On Dec 17, 12:38 pm, "leamas" <[EMAIL PROTECTED]> wrote: > class Holiday extends AppModel > { > var $name = 'Holiday'; > var $hasMany = 'Product'; > > }class Product extends AppModel > { > var $name = 'Product'; > var $belongsTo = 'Holiday'; > > }This is what I've done and now my next question will be: If I have > this, then in my view (/views/holidays/christmas.thtml), how do I > retrieve the products that only pertain to Christmas when I can only > access the holidays table? > > Brandon Olivares wrote: > > Why not a hasMany association for holidays to products, and a belongsTo > > association for the other way? I don't see why this wouldn't work? > > > -----Original Message----- > > From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf > > Of leamas > > Sent: Sunday, December 17, 2006 2:27 PM > > To: Cake PHP > > Subject: Joining 2 tables - better practice? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
