Iterate over doctrineCollection-like objects.