Issue #2782833 by Mile23, martin107, larowlan, effulgentsia: Remove usages of deprecated EntityManager from Entity class