Skip to content

Commit fef57d5

Browse files
committed
Reworded a misleading Doctrine explanation
1 parent 8dc90ef commit fef57d5

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
@@ -542,13 +542,12 @@ Take a look at the previous example in more detail:
542542

543543
.. note::
544544

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

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

0 commit comments

Comments
 (0)