From fef57d5497d2f5ad81969e1d6725f869260b0af4 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sun, 19 Oct 2014 22:38:08 +0200 Subject: [PATCH 1/2] Reworded a misleading Doctrine explanation --- book/doctrine.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/book/doctrine.rst b/book/doctrine.rst index 39a07663ad0..f8d9867bbc6 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -542,13 +542,12 @@ Take a look at the previous example in more detail: .. note:: - In fact, since Doctrine is aware of all your managed entities, when you - call the ``flush()`` method, it calculates an overall changeset and executes - the most efficient query/queries possible. For example, if you persist a - total of 100 ``Product`` objects and then subsequently call ``flush()``, - Doctrine will create a *single* prepared statement and re-use it for each - insert. This pattern is called *Unit of Work*, and it's used because it's - fast and efficient. + In fact, since Doctrine is aware of all your managed entities, when you call + the ``flush()`` method, it calculates an overall changeset and executes + the queries in the correct order. It utilizes cached prepare statement to + slightly improve the performance. For example, if you persist a total of 100 + ``Product`` objects and then subsequently call ``flush()``, Doctrine will + execute 100 ``INSERT`` queries using a single prepared statement object. When creating or updating objects, the workflow is always the same. In the next section, you'll see how Doctrine is smart enough to automatically issue From ef86b529236450c7cccbecafcd31927e95350ca9 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 25 Oct 2014 09:28:39 +0200 Subject: [PATCH 2/2] Fixed typo --- book/doctrine.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/doctrine.rst b/book/doctrine.rst index f8d9867bbc6..a731c25fec7 100644 --- a/book/doctrine.rst +++ b/book/doctrine.rst @@ -544,7 +544,7 @@ Take a look at the previous example in more detail: In fact, since Doctrine is aware of all your managed entities, when you call the ``flush()`` method, it calculates an overall changeset and executes - the queries in the correct order. It utilizes cached prepare statement to + the queries in the correct order. It utilizes cached prepared statement to slightly improve the performance. For example, if you persist a total of 100 ``Product`` objects and then subsequently call ``flush()``, Doctrine will execute 100 ``INSERT`` queries using a single prepared statement object.