We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dd2386 commit c895f0fCopy full SHA for c895f0f
en/orm/behaviors/counter-cache.rst
@@ -131,6 +131,14 @@ then updates the counter of the *previously* associated item.
131
behavior to the ``CommentsTable`` in order to generate ``comment_count`` for
132
Articles table.
133
134
+.. versionchanged:: 5.1.2
135
+
136
+ As of CakePHP 5.1.2, the counter cache values are updated using a single
137
+ query using sub-queries, instead of separate queries, to fetch the count and
138
+ update a record. If required you can disable the use of sub-queries by
139
+ setting `useSubQuery` key to `false` in the config
140
+ `['Articles' => ['comment_count' => ['useSubQuery' => false]]`
141
142
Belongs to many Usage
143
=====================
144
0 commit comments