EntityRef uses reference to EntityManager rather than pointer