code: function(key, value, options) {
              var attrs, subattrs, scope, changes, newattributes, diffs;
  
              // Handle both `"key", value` and `{key: value}` -style arguments.
              if (typeof key === 'object') {
                  attrs = key;
                  options = value;
              } else {
                  attrs = {};
                  scope = key.split(".");
                  subattrs = attrs;
                  for (var i in scope) {
                      var key = scope[i];
                      if (i == (scope.length - 1)) {
                          subattrs[key] = value;
                      } else {
                          subattrs[key] = {};
                          subattrs = subattrs[key];
                      }
                  }
              }
  
              // Define options
              options = _.defaults(options || {}, {
                  silent: false
              });
  
              // Calcul new attributes
              newattributes = _.deepExtend({}, this.attributes || {}, attrs);
              if (!options.silent) {
                  diffs = jsondiffpatch.diff(this._prevAttributes || {}, newattributes);
              }
              this.attributes = newattributes;
              this._prevAttributes = _.deepClone(this.attributes);
  
              // New unique id
              var oldId = this.id;
              if (this.idAttribute in this.attributes) {
                  this.id = this.attributes[this.idAttribute];
              } else {
                  this.id = this.cid;
              }
              if (oldId != this.id) this.trigger("id", this.id, oldId);
  
              // Calcul diffs
              if (!options.silent) {
                  diffs = _.diffkeys(diffs);
                  _.each(diffs, function(tag) {
                      this.trigger("change:"+tag, tag);
                  }, this);
                  if (diffs.length > 0) this.trigger("set", diffs);
              }
  
              return this;
          }
docs: /*
  Define a field or a map of field
  @key : attribute key
  @value : value