updated repository factory
Merge pull request #283 from doctrine/fix_factory

updated repository factory