doctrine/doctrine2 — pull request #1032 by bakura10 (2014-05-17 10:57:58+00:00)
Title: Add support for optimized contains

Hi,

This continue my work on the LazyCriteria and include a support for optimized contains that does not initialize the full collection when checking if a record exists in a collection.

Please note that I had to modify the exists method signature in EntityInterface. I'm not sure this is a problem because, as @ocramius said in the ManyToMany thread, custom persisters is not supported. However, I added a small note to be sure ;).