On Thu, Nov 18, 2010 at 6:12 AM, Matthias <[email protected]> wrote: > Thanks for the reply. Is this the best / usual way to do it? I thought > that the models and database tables are "automagically" connected. And > it works with the customers, as you can see above, but why doesnt it > work for the items?
It's one way to do it. And it's probably the best way to get Cake to use the closest thing to what one would normally do with straight SQL. Cake's "automagic" querying of the DB comes at some cost, as joins aren't necessarily used. Instead, it'll fetch the data using one or more queries. > And is the rest correct? Just asking because the same query with > "WHERE `Customer`.`id` = 1" is done 2 times, and all the "SELECT > `Item`.`name`" are done one by one, which looks incorrect to me. > greetings To be honest, I didn't wade through all of that. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" 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
