set(field, value) {

    if (!this.hasField(field)) {

      throw new Error('Field ' + field + ' does not belong to model ' + this.constructor.name);

    }

    let curValue = this._data[field];
    let changed = false;
    value = this.convert(field, value);

    if (value !== curValue) {

      changed = true;

      if (
        value instanceof Array &&
        curValue instanceof Array &&
        value.length === curValue.length
      ) {

        changed = false;
        // If we have two equal length arrays, we must compare every value

        for (let i = 0; i < value.length; i++) {
          if (value[i] !== curValue[i]) {
            changed = true;
            break;
          }
        }
      }

      // If we have an object value (json), do a deterministic diff using
      // node-deep-equals
      // NOTE: Lets do an extra deep object test
      if ( utilities.isObject(value) ) {
        changed = !deepEqual( curValue, value, { strict: true});
      }

    }

    this._data[field] = value;
    this._changed[field] = changed;
    changed && this.__validate__(field);

    return value;

  }
Sets specified field data for the model. Logs and validates the change.
@param {string} field Field to set
@param {any} value Value for the field