assets/js/vendor/backbone-relational.js
function( options ) {
			if ( this._isInitialized && !this.isLocked() ) {
				_.each( this._relations, function( rel ) {
					// Update from data in `rel.keySource` if data got set in there, or `rel.key` otherwise
					var val = this.attributes[ rel.keySource ] || this.attributes[ rel.key ];
					if ( rel.related !== val ) {
						this.trigger( 'relational:change:' + rel.key, this, val, options || {} );
					}

					// Explicitly clear 'keySource', to prevent a leaky abstraction if 'keySource' differs from 'key'.
					if ( rel.keySource !== rel.key ) {
						delete rel.instance.attributes[ rel.keySource ];
					}
				}, this );
			}
		}
function( options ) {
			if ( this._isInitialized && !this.isLocked() ) {
				_.each( this._relations, function( rel ) {
					// Update from data in `rel.keySource` if data got set in there, or `rel.key` otherwise
					var val = this.attributes[ rel.keySource ] || this.attributes[ rel.key ];
					if ( rel.related !== val ) {
						this.trigger( 'relational:change:' + rel.key, this, val, options || {} );
					}

					// Explicitly clear 'keySource', to prevent a leaky abstraction if 'keySource' differs from 'key'.
					if ( rel.keySource !== rel.key ) {
						delete rel.instance.attributes[ rel.keySource ];
					}
				}, this );
			}
		}
function ( options ) { if ( this . _isInitialized && ! this . isLocked ( ) ) { _ . each ( this . _relations , function ( rel ) { // Update from data in `rel.keySource` if data got set in there, or `rel.key` otherwise var val = this . attributes [ rel . keySource ] || this . attributes [ rel . key ] ; if ( rel . related !== val ) { this . trigger ( 'relational:change:' + rel . key , this , val , options || { } ) ; } // Explicitly clear 'keySource', to prevent a leaky abstraction if 'keySource' differs from 'key'. if ( rel . keySource !== rel . key ) { delete rel . instance . attributes [ rel . keySource ] ; } } , this ) ; } }
When new values are set, notify this model's relations (also if options.silent is set).
(Relation.setRelated locks this model before calling 'set' on it to prevent loops)
When new values are set notify this model s relations ( also if options . silent is set ) . ( Relation . setRelated locks this model before calling set on it to prevent loops )