Hi Bakers,

I have a pretty complex data model forming, and I wonder if I should
be looking at things from a different perspective.

I have 3 main tables:

Companies
Products
Templates

I need to be able to assign a given Template to All, One or Many
Companies. I also need to assign a given Template to One or Many
Products.

I can not easily use a vanilla HABTM association, because the I need
to retrieve all Templates that are not assigned to a Company, which I
can do by setting a column in the Templates row 'public' = '1', using
that to exclude when searching.

However, a Template will be required to be assigned to at least a
single Product, meaning a vanilla HABTM should suffice to connect
those 2 models.

Do I need some crazy ass join model like:

CompanyProductTemplate or something.

Any ideas?

Thanks,

Jon

-- 


jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

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