Doctrine 2 - ORM

[GH-695] Implemented support for RepositoryFactory.