I came accross an issue with the built in counter cache.
My cake version is 1.2.0.6311
The query generated by cake to update the counter uses joins.
Suppose I have a model 'foo' which which has many 'dependent
'foo' itself belongs to 'bar' which has many 'foo'
The query to update the counter cache ('foo'.'dependent_count) will
look something like this:
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.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---