Deprecated call getEntityManager() Fixed