Hello, I have two models - User and Interest. They are linked using HABTM association, so Users HABTM Interests and Interests HABTM Users.
When i'm trying to do: $this->Interest->findAll(); then I see main query from table corresponding to interests, and bunch of queries from users table. I understand, that Cake is trying to find associations. But this way is very inefficient! I always think that this problem can be solved with just one query like that: SELECT * FROM `interests` AS `Interest` LEFT JOIN `interests_users` ON (`interests_users`.`interest_id` = `Interest`.`id`) LEFT JOIN `users` AS `User` ON (`interests_users`.`user_id` = `User`.`id`) Why Cake don't use something like that? May be i'm lost something? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
