replace key from entities for Long keys