code: public <S extends Model> int updateByModel(S model) {
          this.beforeCheck();
  
          Object primaryKey = AnimaUtils.getAndRemovePrimaryKey(model);
  
          StringBuilder sql = new StringBuilder(this.buildUpdateSQL(model, null));
  
          List<Object> columnValueList = AnimaUtils.toColumnValues(model, false);
  
          ifNotNullThen(primaryKey, () -> {
              sql.append(" WHERE ").append(this.primaryKeyColumn).append(" = ?");
              columnValueList.add(primaryKey);
          });
  
          return this.execute(sql.toString(), columnValueList);
      }
docs: Update a model
  
  @param model model instance
  @param <S>
  @return affect the number of rows