Skip to content

Commit 8ae2dd6

Browse files
committed
docs: add changelog and upgrade guide
1 parent c903f86 commit 8ae2dd6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

user_guide_src/source/changelogs/v4.3.0.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Others
8181
- **Database:** ``InvalidArgumentException`` that is a kind of ``LogicException`` in ``BaseBuilder::_whereIn()`` is not suppressed by the configuration. Previously if ``CI_DEBUG`` was false, the exception was suppressed.
8282
- **Database:** The data structure returned by :ref:`BaseConnection::getForeignKeyData() <metadata-getforeignkeydata>` has been changed.
8383
- **Database:** ``CodeIgniter\Database\BasePreparedQuery`` class returns now a bool value for write-type queries instead of the ``Result`` class object.
84+
- **Model:** ``Model::update()`` method now raises a ``DatabaseException`` if it generates an SQL
85+
statement without a WHERE clause; Model does not support operations that update all records.
8486
- **Routing:** ``RouteCollection::resetRoutes()`` resets Auto-Discovery of Routes. Previously once discovered, RouteCollection never discover Routes files again even if ``RouteCollection::resetRoutes()`` is called.
8587

8688
.. _v430-interface-changes:

user_guide_src/source/installation/upgrade_430.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ Database
210210
- The second parameter ``$index`` of ``BaseBuilder::updateBatch()`` has changed to ``$constraints``. It now accepts types array, string, or ``RawSql``. Extending classes should likewise change types.
211211
- The ``$set`` parameter of ``BaseBuilder::insertBatch()`` and ``BaseBuilder::updateBatch()`` now accepts an object of a single row of data. Extending classes should likewise change the type.
212212
- The third parameter ``$index`` of ``BaseBuilder::_updateBatch()`` has changed to ``$values``, and the parameter type has changed to ``array``. Extending classes should likewise change the type.
213+
- The ``Model::update()`` method now raises a ``DatabaseException`` if it generates an SQL
214+
statement without a WHERE clause. If you need to update all records in a table, use Query Builder instead. E.g., ``$model->builder()->update($data)``.
213215

214216
Others
215217
======

0 commit comments

Comments
 (0)