doctrine/doctrine2 — pull request #912 by BenMorel (2014-01-17 11:06:48+00:00)
Title: Avoid PersistentCollection::isEmpty() to fully load the collection.

This is a suggested simple performance improvement for `PersistentCollection`.

At the moment, `isEmpty()` always fully loads the collection. By changing the code to rely on `count()`, which makes advantage of extra lazy fetch when the collection is not loaded, this saves the overhead of loading the entire collection when one just wants to check whether the collection is empty.