Changed getEntityManager to getManager as it is being deprecated