Fix getEntityManagerForClass deprecated call