Add support for extending doctrine2

Enable extending the collection provided by doctrine.