deprecated getEntityManager