Initial work for efficient counting on criteria
Remove useless dependency
Use inner collection count if initialized
Also add efficient count for Persistent collection
Add tests
Update to latest cache API
Add missing methods to the mock
Fix tests for inheritance support
Typehint to interface to support second level cache
Reuse Doctrine Collection Lazy Collection
Remove useless imports
Add method visibility
Add test for Entity Repository
Add tests for PersistentCollection
Only create lazy collection for EXTRA_LAZY
Fix test on some RDBMS
Update tests
Fix inconsistent mapping
Fix tests by forcing collection initialization
Added count cache when lazy collection is not yet initialized. Some cosmetic changes (primarily, there's no ELSE).