Removing deprecated usages of getEntityManager and replacing with getManager