I think that you can omit this one, since EntityRepository implements ObjectManager ... the class should be able to resolve this case