Skip to content

Commit

Permalink
Fix bulk insert code example
Browse files Browse the repository at this point in the history
Previous code example did not flush all entities when entity count was not a multiple of batch count.
  • Loading branch information
thekeyboardbum committed Jul 30, 2014
1 parent 514dd4e commit 2d23c95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/en/reference/batch-processing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ internally but also mean more work during ``flush``.
$em->clear(); // Detaches all objects from Doctrine!
}
}
$em->flush(); //Persist objects that did not make up an entire batch
$em->clear();
Bulk Updates
------------
Expand Down

0 comments on commit 2d23c95

Please sign in to comment.