Hint on how to create iteratable queries for Doctrine