Jira issue originally created by user @beberlei:
We want an API that allows users to filter collections to subsets on the SQL level during the runtime (not using DQL).
public function getRecentComments()
return $this->comments->select(Expression::lessThan("commentDate", new \DateTime("-7 days")));
The language of this Expressions for selecting entities out of a collection has to be so simple that it works on both arrays and any persistence backed data-source.
The Collection#select() method would return a new collection that is not equal the invoked collection.
Comment created by @beberlei:
First API example: https://gist.github.com/1766769
There is a PR now doctrine/common#117
Issue was closed with resolution "Fixed"