set id to update when there is id