Skip to content

Commit

Permalink
Remove redundant info
Browse files Browse the repository at this point in the history
5.x has only the immutable versions of datetime classes.
  • Loading branch information
ADmad authored Oct 17, 2023
1 parent 250a81d commit 46deb07
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions en/orm/database-basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -757,23 +757,6 @@ The above class does a few interesting things:
Once we've built our custom type, we'll need to :ref:`connect our type
to our table class <saving-complex-types>`.

.. _immutable-datetime-mapping:

Enabling Immutable DateTime Objects
-----------------------------------

Because Date/Time objects are easily mutated in place, CakePHP allows you to
enable immutable value objects. This is best done in your application's
**config/bootstrap.php** file::

TypeFactory::build('datetime')->useImmutable();
TypeFactory::build('date')->useImmutable();
TypeFactory::build('time')->useImmutable();
TypeFactory::build('timestamp')->useImmutable();

.. note::
New applications will have immutable objects enabled by default.

Connection Classes
==================

Expand Down

0 comments on commit 46deb07

Please sign in to comment.