yes there is one > 'foo' itself belongs to 'bar' which has many 'foo' I understand that it is this association which is causing the join. But I don't understand why that join is required. Isn't all the counter cache is supposed to do is update foo.dependent_count What does it need the join for then?
On May 14, 9:10 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Wed, May 14, 2008 at 4:04 PM, MarcS <[EMAIL PROTECTED]> wrote: > > > UPDATE foos as foo LEFT JOIN 'bars' as 'bar' ON ('foo'.bar_id = > > bar.id) SET foo.dependent_count = 99 WHERE foo.id=1 > > > Why does it do that? I can't see the point in creating this join. It > > serves no purpose whatsoever. > > Well, do you have an association in your models between foo and bar? > > -- > Chris Hartjes > Internet Loudmouth > Motto for 2008: "Moving from herding elephants to handling snakes..." > @TheKeyBoard:http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---