Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions en/appendices/5-3-migration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Command
- ``cake plugin assets symlink`` command now supports a ``--relative`` option to
create relative path symlinks. This is useful when creating symlinks within
containers that use volume mounts.
- ``cake server`` now supports a ``--frankenphp`` option that will start the
development server with `FrankenPHP <https://frankenphp.dev/>`__.

Console
-------
Expand All @@ -58,9 +60,13 @@ Console
Database
--------

- Added support for Entra authentication to SqlServer driver.
- Added ``Query::optimizerHint()`` which accepts engine-specific optimizer hints.
- Added ``Query::getDriver()`` helper which returns the ``Driver`` for the current connection
role by default.
- Added support for ``year`` column types in MySQL.
- Added support for ``inet``, ``cidr`` and ``macaddr`` network column types to
postgres driver.

Mailer
------
Expand Down
13 changes: 12 additions & 1 deletion en/orm/database-basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ timestampfractional
Maps to the ``TIMESTAMP(N)`` type.
time
Maps to a ``TIME`` type in all databases.
year
Maps to the ``YEAR`` type. Only supported in MySQL.
json
Maps to a ``JSON`` type if it's available, otherwise it maps to ``TEXT``.
enum
Expand All @@ -411,6 +413,12 @@ linestring
Maps to a single line in geospatial storage.
polygon
Maps to a single polygon in geospatial storage.
inet
Maps to the ``INET`` type. Only implemented in postgres.
cidr
Maps to the ``CIDR`` type. Only implemented in postgres.
macaddr
Maps to the ``MACADDR`` type. Only implemented in postgres.

These types are used in both the schema reflection features that CakePHP
provides, and schema generation features CakePHP uses when using test fixtures.
Expand All @@ -429,6 +437,9 @@ handles, and generate file handles when reading data.
.. versionchanged:: 5.2.0
The ``nativeuuid`` type was added.

.. versionadded:: 5.3.0
The ``inet``, ``cidr``, ``macaddr``, and ``year`` types were added.

.. _datetime-type:

DateTime Type
Expand Down Expand Up @@ -1100,7 +1111,7 @@ databases. For example to create a database::
.. note::

When creating a database it is a good idea to set the character set and
collation parameters (e.g. ``DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci``).
collation parameters (e.g. ``DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci``).
If these values are missing, the database will set whatever system default values it uses.

.. meta::
Expand Down
14 changes: 14 additions & 0 deletions en/orm/query-builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,20 @@ even on DBMS that does not natively support it::
.. note::
Tuple comparison transform only supports the ``IN`` and ``=`` operators

Optimizer Hints
---------------

Optimizer hints allow you to control execution plans at the individual query
level::

$query->optimizerHint(['NO_BKA(articles)']);

Optimizer hints are currently only supported by MySQL and Postgres (via an
extension).

.. versionadded:: 5.3.0
``Query::optimizerHint()`` was added.

Getting Results
===============

Expand Down