``getEntityManager`` is a deprecated method