File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -542,13 +542,12 @@ Take a look at the previous example in more detail:
542
542
543
543
.. note ::
544
544
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.
552
551
553
552
When creating or updating objects, the workflow is always the same. In the
554
553
next section, you'll see how Doctrine is smart enough to automatically issue
You can’t perform that action at this time.
0 commit comments