Added a generic id -> entity transformer