From 8c0dcd6aa9e057ba786780e3f544ccda2a0999bf Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 28 Oct 2021 22:38:21 +0200 Subject: [PATCH 1/5] Linking "Unit of Work" --- docs/en/reference/architecture.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/reference/architecture.rst b/docs/en/reference/architecture.rst index 6558c3ee8e7..6c005e43298 100644 --- a/docs/en/reference/architecture.rst +++ b/docs/en/reference/architecture.rst @@ -184,6 +184,8 @@ in well defined units of work. Work with your objects and modify them as usual and when you're done call ``EntityManager#flush()`` to make your changes persistent. +.. _unit-of-work: + The Unit of Work ~~~~~~~~~~~~~~~~ From cae561959fd2223b3fb7b1a653cf5f072c5ce74f Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 28 Oct 2021 22:40:35 +0200 Subject: [PATCH 2/5] Update getting-started.rst --- docs/en/tutorials/getting-started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/tutorials/getting-started.rst b/docs/en/tutorials/getting-started.rst index 1cb108668ca..08b5a0e5cd7 100644 --- a/docs/en/tutorials/getting-started.rst +++ b/docs/en/tutorials/getting-started.rst @@ -642,7 +642,7 @@ Let's continue by creating a script to display the name of a product based on it echo sprintf("-%s\n", $product->getName()); Next we'll update a product's name, given its id. This simple example will -help demonstrate Doctrine's implementation of the UnitOfWork pattern. Doctrine +help demonstrate Doctrine's implementation of the :ref:`UnitOfWork pattern`. Doctrine keeps track of all the entities that were retrieved from the Entity Manager, and can detect when any of those entities' properties have been modified. As a result, rather than needing to call ``persist($entity)`` for each individual From 5aef89fb996779b570c8530217cb61c4a0f0458c Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 28 Oct 2021 22:41:36 +0200 Subject: [PATCH 3/5] Update getting-started.rst --- docs/en/tutorials/getting-started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/tutorials/getting-started.rst b/docs/en/tutorials/getting-started.rst index 08b5a0e5cd7..a40354e5086 100644 --- a/docs/en/tutorials/getting-started.rst +++ b/docs/en/tutorials/getting-started.rst @@ -1334,7 +1334,7 @@ call this script as follows: php create_bug.php 1 1 1 See how simple it is to relate a Bug, Reporter, Engineer and Products? -Also recall that thanks to the UnitOfWork pattern, Doctrine will detect +Also recall that thanks to the :ref:`UnitOfWork pattern`, Doctrine will detect these relations and update all of the modified entities in the database automatically when ``flush()`` is called. From 2968cac692e6a510a93765844dfae54c8e5c9956 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Fri, 29 Oct 2021 20:57:20 +0200 Subject: [PATCH 4/5] Update docs/en/tutorials/getting-started.rst Co-authored-by: Javier Spagnoletti --- docs/en/tutorials/getting-started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/tutorials/getting-started.rst b/docs/en/tutorials/getting-started.rst index a40354e5086..89a4f5118b5 100644 --- a/docs/en/tutorials/getting-started.rst +++ b/docs/en/tutorials/getting-started.rst @@ -642,7 +642,7 @@ Let's continue by creating a script to display the name of a product based on it echo sprintf("-%s\n", $product->getName()); Next we'll update a product's name, given its id. This simple example will -help demonstrate Doctrine's implementation of the :ref:`UnitOfWork pattern`. Doctrine +help demonstrate Doctrine's implementation of the :ref:`UnitOfWork pattern `. Doctrine keeps track of all the entities that were retrieved from the Entity Manager, and can detect when any of those entities' properties have been modified. As a result, rather than needing to call ``persist($entity)`` for each individual From 1bd426e2616296339314e2774d63d3ca24f896b2 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Fri, 29 Oct 2021 20:57:27 +0200 Subject: [PATCH 5/5] Update docs/en/tutorials/getting-started.rst Co-authored-by: Javier Spagnoletti --- docs/en/tutorials/getting-started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/tutorials/getting-started.rst b/docs/en/tutorials/getting-started.rst index 89a4f5118b5..7013fb2cdf7 100644 --- a/docs/en/tutorials/getting-started.rst +++ b/docs/en/tutorials/getting-started.rst @@ -1334,7 +1334,7 @@ call this script as follows: php create_bug.php 1 1 1 See how simple it is to relate a Bug, Reporter, Engineer and Products? -Also recall that thanks to the :ref:`UnitOfWork pattern`, Doctrine will detect +Also recall that thanks to the :ref:`UnitOfWork pattern `, Doctrine will detect these relations and update all of the modified entities in the database automatically when ``flush()`` is called.