DDC-1511: Suggestion on the docs for batch processing #1895

Closed
opened 2026-01-22 13:30:03 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Nov 25, 2011).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user jamie0725:

I am refering to the examples on

http://www.doctrine-project.org/docs/orm/2.0/en/reference/batch-processing.html

Let's say you want to process a bulk of 25 objects and have a batchsize of 20.
With the code provided the last 5 would not be saved as far as I understand unless you do another flush after the for-loop.

This is probably very clear to any experienced Doctrine developer but maybe it is also confusing for beginners like me (some internet sources say, that flush is executed automatically at the end of the request, but obviously it is not). Maybe this could be mentioned somewhere?

Originally created by @doctrinebot on GitHub (Nov 25, 2011). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user jamie0725: I am refering to the examples on http://www.doctrine-project.org/docs/orm/2.0/en/reference/batch-processing.html Let's say you want to process a bulk of 25 objects and have a batchsize of 20. With the code provided the last 5 would not be saved as far as I understand unless you do another flush after the for-loop. This is probably very clear to any experienced Doctrine developer but maybe it is also confusing for beginners like me (some internet sources say, that flush is executed automatically at the end of the request, but obviously it is not). Maybe this could be mentioned somewhere?
admin added the DocumentationInvalid labels 2026-01-22 13:30:03 +01:00
admin closed this issue 2026-01-22 13:30:05 +01:00
Author
Owner

@malukenho commented on GitHub (Jan 5, 2017):

@Ocramius @lcobucci more documentation issue that can be closed.

@malukenho commented on GitHub (Jan 5, 2017): @Ocramius @lcobucci more documentation issue that can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1895