add missing cast in ObjectRepositoryTypeProvider for getRepository method check