Skip to content

Commit d373bc7

Browse files
committed
docs: clarify chunking caveats
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent 74b3f2b commit d373bc7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

user_guide_src/source/models/model.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,8 @@ Sometimes, you need to process large amounts of data and would run the risk of r
980980
This is best used during cronjobs, data exports, or other large tasks. To make this simpler, you can
981981
process the data in smaller, manageable pieces using the methods below.
982982

983+
.. note:: The ``chunk()``, ``chunkRows()``, ``chunkById()``, and ``chunkRowsById()`` methods do not trigger Model callbacks.
984+
983985
chunk()
984986
-------
985987

@@ -1020,7 +1022,8 @@ If you want the entire ID-based chunk to be passed to the Closure at once, use `
10201022

10211023
.. warning:: ID-based chunking needs the model to define a primary key, and that primary key must be selected.
10221024
If you customize the selected columns, make sure the primary key is included.
1023-
When joining tables, make sure the model table primary key remains available under its normal field name.
1025+
When using joins, the model primary key must remain available under its normal field name,
1026+
and each primary key value must appear only once in the result set. Otherwise, rows may be skipped.
10241027
These methods manage their own primary key ordering and cannot be used with
10251028
``orderBy()``, ``groupBy()``, ``limit()``, ``offset()`` or ``union()``.
10261029
You should also avoid changing primary key values while processing chunks.

0 commit comments

Comments
 (0)