Well, you can't. Not without additional effort. :D My solution would be like this:
Get the user with rec = 1. And then foreach review, get again with rec = 1. (so you will have N + 1 get operations, with N is the number of item for a specific user) You should try looking at the query execution time (with DEBUG = 2). If get user with rec = 2 is faster, maybe you should stick with that config. -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of lemp Sent: 10 Nopember 2006 20:22 To: Cake PHP Subject: How do I retrieving the right amount of data I am building a review system with a model like this one: users <-> reviews <-> items (<-> means HABTM) Each item also has a link to the user who added it to the DB. Each item has links to attributes tables (like colors, countries, etc.) Each user is also related to some other tables. My problem is that when I get the reviews with a recursive value of 1, I get the user and item for each review but I don't get the attributes values for the item. If I set the recursive value to 2, I get those attributes values, but I also get all relationship from the user, which brings back way too much data. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
