Rework entity map to do both directions.