getEntityManager deprecated