select and merge before update the model.