Skip to content

Commit

Permalink
docs: add a note about setting the null value for the primary key in …
Browse files Browse the repository at this point in the history
…Model::update() (#6848)

* docs: add a note about setting the null value for the primary key in Model::update()

* change note to important
  • Loading branch information
michalsn authored Nov 13, 2022
1 parent 5a77d11 commit 9167ea9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions user_guide_src/source/models/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ of the columns in a ``$table``, while the array's values are the values to save

.. literalinclude:: model/016.php

.. 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:

.. literalinclude:: model/017.php
Expand Down

0 comments on commit 9167ea9

Please sign in to comment.