torso-bundle.js
function(alias, model, copy) {
      this.__currentObjectModels[alias] = model;
      this.__updateCache(model);
      this.resetUpdating();
      if (copy) {
        _.each(this.getMappings(), function(config, mappingAlias) {
          var modelAliases;
          if (alias === mappingAlias) {
            this.__pull(mappingAlias);
          }
          if (config.computed) {
            modelAliases = this.__getModelAliases(mappingAlias);
            if (_.contains(modelAliases, alias)) {
              this.__pull(mappingAlias);
            }
          }
        }, this);
      }
    }
function(alias, model, copy) {
      this.__currentObjectModels[alias] = model;
      this.__updateCache(model);
      this.resetUpdating();
      if (copy) {
        _.each(this.getMappings(), function(config, mappingAlias) {
          var modelAliases;
          if (alias === mappingAlias) {
            this.__pull(mappingAlias);
          }
          if (config.computed) {
            modelAliases = this.__getModelAliases(mappingAlias);
            if (_.contains(modelAliases, alias)) {
              this.__pull(mappingAlias);
            }
          }
        }, this);
      }
    }
function ( alias , model , copy ) { this . __currentObjectModels [ alias ] = model ; this . __updateCache ( model ) ; this . resetUpdating ( ) ; if ( copy ) { _ . each ( this . getMappings ( ) , function ( config , mappingAlias ) { var modelAliases ; if ( alias === mappingAlias ) { this . __pull ( mappingAlias ) ; } if ( config . computed ) { modelAliases = this . __getModelAliases ( mappingAlias ) ; if ( _ . contains ( modelAliases , alias ) ) { this . __pull ( mappingAlias ) ; } } } , this ) ; } }
Update or create a binding between an object model and an alias.
@method trackModel
@param alias {String} the alias/name to bind to.
@param model {Backbone Model instance} the model to be bound. Mappings referencing this alias will start applying to this model.
@param [copy=false] {Boolean} if true, the form model will perform a pull on any mappings using this alias.
Update or create a binding between an object model and an alias .