propelorm/Propel2 — pull request #269 by fzaninotto (2012-07-26 10:45:39+00:00)
Title: Query iterator

Make `ModelCriteria` implement `IteratorAggregate`. So now the query can be iterated on, and this executes a `find()` in the background:

```php
filterByTitle('War%'); // see Ma, no find()!
foreach ($books as $book) {
echo $book->getTitle();
}
```

In addition to saving one line of code, this delays the actual query execution to the moment it's iterated on. Using MVC frameworks, this typically happens in the view rather than in the controller, and therefore it can be seen as a way to hit the database more lazily.