code: func (n *HumanFriendlyNumber) BeforeUpdate(scope *gorm.Scope) error {
  	scope.Search.Where(fmt.Sprintf(`"%s"."number"=?`, scope.TableName()), n.Number)
  	return nil
  }
docs: // BeforeUpdate is a GORM callback (see http://doc.gorm.io/callbacks.html) that
  // will be called before updating the model. We use it to check for number
  // compatibility by adding this condition to the WHERE clause of the UPDATE:
  //
  //    AND number=<NUMBER-OF-THE-MODEL>
  //
  // This guarantees that you cannot change the number on the model when you
  // update it. The UPDATE will affect no rows!
  //
  // NOTE(kwk): We could have used scope.Search.Omit("number") in order to avoid
  // setting the number, but there is practically no way to tell back to the
  // model, that we have ignored the number column.