Return original entity in upsert if save fails