When saving record, only update id with last insert id if the record is unsaved.