Removed calls to deprecated 'getEntityManager'