fixed getRepository in ObjectManager