From 0240441d06299a1db316ff4db193446dd61eadc8 Mon Sep 17 00:00:00 2001 From: michalsn Date: Sun, 13 Nov 2022 12:23:50 +0100 Subject: [PATCH 1/2] docs: add a note about setting the null value for the primary key in Model::update() --- user_guide_src/source/models/model.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/user_guide_src/source/models/model.rst b/user_guide_src/source/models/model.rst index 6dbdb0a96951..ec004a327570 100644 --- a/user_guide_src/source/models/model.rst +++ b/user_guide_src/source/models/model.rst @@ -332,6 +332,8 @@ of the columns in a ``$table``, while the array's values are the values to save .. literalinclude:: model/016.php +.. note:: If the ``$primaryKey`` field is set to ``null`` then the update will affect all records in the table. + Multiple records may be updated with a single call by passing an array of primary keys as the first parameter: .. literalinclude:: model/017.php From 8736bc6920dd93ad45a8f3c0b75cb600e0d696f5 Mon Sep 17 00:00:00 2001 From: michalsn Date: Sun, 13 Nov 2022 13:14:01 +0100 Subject: [PATCH 2/2] change note to important --- user_guide_src/source/models/model.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/models/model.rst b/user_guide_src/source/models/model.rst index ec004a327570..67f104a268f6 100644 --- a/user_guide_src/source/models/model.rst +++ b/user_guide_src/source/models/model.rst @@ -332,7 +332,7 @@ of the columns in a ``$table``, while the array's values are the values to save .. literalinclude:: model/016.php -.. note:: If the ``$primaryKey`` field is set to ``null`` then the update will affect all records in the table. +.. important:: If the ``$primaryKey`` field is set to ``null`` then the update will affect all records in the table. Multiple records may be updated with a single call by passing an array of primary keys as the first parameter: