Skip to content

Commit ad378aa

Browse files
committed
Fix counter_cache command argument order in examples
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
1 parent b263076 commit ad378aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)