Skip to content

Commit 2ab2e1f

Browse files
committed
bug #4342 Reworded a misleading Doctrine explanation (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Reworded a misleading Doctrine explanation | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #4337 Commits ------- ef86b52 Fixed typo fef57d5 Reworded a misleading Doctrine explanation
2 parents cef629c + ef86b52 commit 2ab2e1f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

book/doctrine.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -544,13 +544,12 @@ Take a look at the previous example in more detail:
544544

545545
.. note::
546546

547-
In fact, since Doctrine is aware of all your managed entities, when you
548-
call the ``flush()`` method, it calculates an overall changeset and executes
549-
the most efficient query/queries possible. For example, if you persist a
550-
total of 100 ``Product`` objects and then subsequently call ``flush()``,
551-
Doctrine will create a *single* prepared statement and re-use it for each
552-
insert. This pattern is called *Unit of Work*, and it's used because it's
553-
fast and efficient.
547+
In fact, since Doctrine is aware of all your managed entities, when you call
548+
the ``flush()`` method, it calculates an overall changeset and executes
549+
the queries in the correct order. It utilizes cached prepared statement to
550+
slightly improve the performance. For example, if you persist a total of 100
551+
``Product`` objects and then subsequently call ``flush()``, Doctrine will
552+
execute 100 ``INSERT`` queries using a single prepared statement object.
554553

555554
When creating or updating objects, the workflow is always the same. In the
556555
next section, you'll see how Doctrine is smart enough to automatically issue

0 commit comments

Comments
 (0)