Check if the id has changed before re-saving