Changed all deprecated references to getEntityManager to getManager