Skip to content

Commit 8ad560c

Browse files
authored
Fix docs on final entities (doctrine#12176)
1 parent ccfb620 commit 8ad560c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/en/reference/advanced-configuration.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ Configuration Options
7676
The following sections describe all the configuration options
7777
available on a ``Doctrine\ORM\Configuration`` instance.
7878

79+
.. _reference-native-lazy-objects:
80+
7981
Native Lazy Objects (**OPTIONAL**)
8082
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8183

docs/en/reference/architecture.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ Entities
7979
An entity is a lightweight, persistent domain object. An entity can
8080
be any regular PHP class observing the following restrictions:
8181

82-
- An entity class must not be final nor read-only but
83-
it may contain final methods or read-only properties.
82+
- An entity class can be final or read-only when
83+
you use :ref:`native lazy objects <reference-native-lazy-objects>`.
84+
It may contain final methods or read-only properties too.
8485
- Any two entity classes in a class hierarchy that inherit
8586
directly or indirectly from one another must not have a mapped
8687
property with the same name. That is, if B inherits from A then B

docs/en/tutorials/getting-started.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ An entity contains persistable properties. A persistable property
4949
is an instance variable of the entity that is saved into and retrieved from the database
5050
by Doctrine's data mapping capabilities.
5151

52-
An entity class must not be final nor read-only, although
53-
it can contain final methods or read-only properties.
52+
An entity class can be final or read-only when you use
53+
:ref:`native lazy objects <reference-native-lazy-objects>`.
54+
It may contain final methods or read-only properties too.
5455

5556
An Example Model: Bug Tracker
5657
-----------------------------

0 commit comments

Comments
 (0)