DDC-127: IterableResult should implement Iterator #159

Closed
opened 2026-01-22 12:29:00 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 6, 2009).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

IterableResult should implement Iterator, because then you could do:

$q = $em->createQuery();
foreach($q->iterate() AS $row) {

}
Originally created by @doctrinebot on GitHub (Nov 6, 2009). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: IterableResult should implement Iterator, because then you could do: ``` $q = $em->createQuery(); foreach($q->iterate() AS $row) { } ```
admin added the New Feature label 2026-01-22 12:29:00 +01:00
admin closed this issue 2026-01-22 12:29:00 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 9, 2009):

Comment created by @beberlei:

There is a problem with the current implementation of IterableResult. On the last loop roundtrip the pdo statement instance inside the hydrator should be closed to allow for a next statement to be executed. This is however not possible since the close/free method on the hydrator nested inside IterableResult is private. Can it be published?

@doctrinebot commented on GitHub (Nov 9, 2009): Comment created by @beberlei: There is a problem with the current implementation of IterableResult. On the last loop roundtrip the pdo statement instance inside the hydrator should be closed to allow for a next statement to be executed. This is however not possible since the close/free method on the hydrator nested inside IterableResult is private. Can it be published?
Author
Owner

@doctrinebot commented on GitHub (Nov 20, 2009):

Comment created by @beberlei:

Implemented and documented in Batch Processing manual section.

@doctrinebot commented on GitHub (Nov 20, 2009): Comment created by @beberlei: Implemented and documented in Batch Processing manual section.
Author
Owner

@doctrinebot commented on GitHub (Nov 20, 2009):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Nov 20, 2009): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#159