Replaced deprecated method "getEntityManager" by "getManager"