Skip to content

Commit 707098a

Browse files
dereuromarkjosbeir
andauthored
Fix counter_cache command argument order in examples (#8196)
The model argument (Comments) should come as the positional argument since it's the table with the CounterCache behavior, and the association (Articles) should be the --assoc option value. Closes #8195 Co-authored-by: Jasper Smet <josbeir@users.noreply.github.com>
1 parent 8bccfa1 commit 707098a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/en/console-commands/counter-cache.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ recovery operations, or to populate new counter caches added to your
66
application.
77

88
``` bash
9-
bin/cake counter_cache --assoc Comments Articles
9+
bin/cake counter_cache Comments --assoc Articles
1010
```
1111

1212
This would rebuild the `Comments` related counters on the `Articles` table.
1313
For very large tables you may need to rebuild counters in batches. You can use
1414
the `--limit` and `--page` options to incrementally rebuild counter state.
1515

1616
``` bash
17-
bin/cake counter_cache --assoc Comments --limit 100 --page 2 Articles
17+
bin/cake counter_cache Comments --assoc Articles --limit 100 --page 2
1818
```
1919

2020
When `limit` and `page` are used, records will be ordered by the table's

0 commit comments

Comments
 (0)