beberlei/DoctrineExtensions — pull request #59 by sandermarechal (2012-01-02 14:31:44+00:00)
Title: Pagination using output walkers

I have implemented the CountWalker and LimitSubqueryWalker using SQL output walkers instead of tree walkers. These SQL walkers use nested count(*) queries. This has some advantages:

* More complex DQL allowed. E.g. using GROUP BY and HAVING with named mixed results
* Better performance. Most databases are able to cache subqueries separately. In order to prevent cache misses, the CountWalker no longer removed ORDER BY clauses thus allowing the underlying database to cache the result and re-use it for the LimitSubquery
* Support for entities with composite primary keys in the CountWalker and LimitSqlWalker. Only the WhereInWalker still needs to be updated for full composite primary key support.