cakephp/cakephp — pull request #2563 by lorenzo (2013-12-28 20:12:43+00:00)
Title: 3.0 buffered as default

This PR makes Query buffer results by default. Some thoughts on the selected solution:

* ResultSet was already making most of the work for buffering, so it made more sense to consolidate the logic there
* Tried wrapping ResultSet with a BufferedResultSet but it became a nightmare, so it turned out not to be a solution, specially when combined with unserialized results.
* Renamed `ResultSet::one` to `ResultSet::first` and added `Collection::first`, this helped uniform the api no matter what type of object the query returned
* Fixed several bugs where buffering results caused other parts of the system to crash