Create an sql VIEW (unrelated to a Cake "view") encompassing all the fields from the tables you want to use as a group. In the CREATE VIEW statement, join the tables in whatever way they usually go together. Create a model based on your new VIEW, just as if it were an ordinary table.
MySQL 5 supports views, as do PostgreSQL and most other database engines. I've used this technique successfully with Cake. I recommend it to anyone who uses a lot of joins. It encapsulates the joins so that often you don't have to think about them in detail -- just as well, because such joins are often the same every time --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
