Refs by links: Implemented refs as links for EntityWithSources

Usually we just use the name `id`.