From b6d08b15c044a81b5a707f228d596d5801350611 Mon Sep 17 00:00:00 2001 From: Jarek Jakubowski Date: Fri, 8 Jun 2018 18:47:39 +0200 Subject: [PATCH 1/3] Mention that Doctrine does not use Entities public API --- docs/en/reference/working-with-objects.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/reference/working-with-objects.rst b/docs/en/reference/working-with-objects.rst index bef73ceba..72d509262 100644 --- a/docs/en/reference/working-with-objects.rst +++ b/docs/en/reference/working-with-objects.rst @@ -25,6 +25,14 @@ Work that have not yet been persisted are lost. Not calling ``EntityManager#flush()`` will lead to all changes during that request being lost. +.. note:: + + Doctrine does NEVER touch the public API of methods in your entity + classes (getters and setters). + Instead, it uses reflection to set/get data from your objects. + When Doctrine fetches data from DB and saves it back, + any code put in your get/set methods won't be implicitly taken into account. + Entities and the Identity Map ----------------------------- From 6b7d67b427e485bad9ebba7f19d7d95cefbecf37 Mon Sep 17 00:00:00 2001 From: Jarek Jakubowski Date: Fri, 8 Jun 2018 20:29:37 +0200 Subject: [PATCH 2/3] Add info about Doctrine not using constructor --- docs/en/reference/working-with-objects.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/working-with-objects.rst b/docs/en/reference/working-with-objects.rst index 72d509262..1bff38a7c 100644 --- a/docs/en/reference/working-with-objects.rst +++ b/docs/en/reference/working-with-objects.rst @@ -28,7 +28,7 @@ Work that have not yet been persisted are lost. .. note:: Doctrine does NEVER touch the public API of methods in your entity - classes (getters and setters). + classes (like getters and setters) nor the constructor method. Instead, it uses reflection to set/get data from your objects. When Doctrine fetches data from DB and saves it back, any code put in your get/set methods won't be implicitly taken into account. From cfc6cfd1a37c345435c13ec38b6a48fbb0a7b99c Mon Sep 17 00:00:00 2001 From: Jarek Jakubowski Date: Sat, 9 Jun 2018 00:29:59 +0200 Subject: [PATCH 3/3] Unnecessary newline removed, small improvements in text --- docs/en/reference/working-with-objects.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/reference/working-with-objects.rst b/docs/en/reference/working-with-objects.rst index 1bff38a7c..6a33663c7 100644 --- a/docs/en/reference/working-with-objects.rst +++ b/docs/en/reference/working-with-objects.rst @@ -29,11 +29,10 @@ Work that have not yet been persisted are lost. Doctrine does NEVER touch the public API of methods in your entity classes (like getters and setters) nor the constructor method. - Instead, it uses reflection to set/get data from your objects. + Instead, it uses reflection to get/set data from/to your entity objects. When Doctrine fetches data from DB and saves it back, any code put in your get/set methods won't be implicitly taken into account. - Entities and the Identity Map -----------------------------