function( options ) {
			var related = null;

			options = _.defaults( { parse: this.options.parse }, options );

			// Replace 'this.related' by 'this.keyContents' if it is a Backbone.Collection
			if ( this.keyContents instanceof Backbone.Collection ) {
				this._prepareCollection( this.keyContents );
				related = this.keyContents;
			}
			// Otherwise, 'this.keyContents' should be an array of related object ids.
			// Re-use the current 'this.related' if it is a Backbone.Collection; otherwise, create a new collection.
			else {
				var toAdd = [];

				_.each( this.keyContents, function( attributes ) {
					if ( attributes instanceof this.relatedModel ) {
						var model = attributes;
					}
					else {
						// If `merge` is true, update models here, instead of during update.
						model = this.relatedModel.findOrCreate( attributes,
							_.extend( { merge: true }, options, { create: this.options.createModels } )
						);
					}

					model && toAdd.push( model );
				}, this );

				if ( this.related instanceof Backbone.Collection ) {
					related = this.related;
				}
				else {
					related = this._prepareCollection();
				}

				// By now, both `merge` and `parse` will already have been executed for models if they were specified.
				// Disable them to prevent additional calls.
				related.set( toAdd, _.defaults( { merge: false, parse: false }, options ) );
			}

			// Remove entries from `keyIds` that were already part of the relation (and are thus 'unchanged')
			this.keyIds = _.difference( this.keyIds, _.pluck( related.models, 'id' ) );

			return related;
		}
function( options ) {
			var related = null;

			options = _.defaults( { parse: this.options.parse }, options );

			
			if ( this.keyContents instanceof Backbone.Collection ) {
				this._prepareCollection( this.keyContents );
				related = this.keyContents;
			}
			
			
			else {
				var toAdd = [];

				_.each( this.keyContents, function( attributes ) {
					if ( attributes instanceof this.relatedModel ) {
						var model = attributes;
					}
					else {
						
						model = this.relatedModel.findOrCreate( attributes,
							_.extend( { merge: true }, options, { create: this.options.createModels } )
						);
					}

					model && toAdd.push( model );
				}, this );

				if ( this.related instanceof Backbone.Collection ) {
					related = this.related;
				}
				else {
					related = this._prepareCollection();
				}

				
				
				related.set( toAdd, _.defaults( { merge: false, parse: false }, options ) );
			}

			
			this.keyIds = _.difference( this.keyIds, _.pluck( related.models, 'id' ) );

			return related;
		}
function ( options ) { var related = null ; options = _ . defaults ( { parse : this . options . parse } , options ) ; // Replace 'this.related' by 'this.keyContents' if it is a Backbone.Collection if ( this . keyContents instanceof Backbone . Collection ) { this . _prepareCollection ( this . keyContents ) ; related = this . keyContents ; } // Otherwise, 'this.keyContents' should be an array of related object ids. // Re-use the current 'this.related' if it is a Backbone.Collection; otherwise, create a new collection. else { var toAdd = [ ] ; _ . each ( this . keyContents , function ( attributes ) { if ( attributes instanceof this . relatedModel ) { var model = attributes ; } else { // If `merge` is true, update models here, instead of during update. model = this . relatedModel . findOrCreate ( attributes , _ . extend ( { merge : true } , options , { create : this . options . createModels } ) ) ; } model && toAdd . push ( model ) ; } , this ) ; if ( this . related instanceof Backbone . Collection ) { related = this . related ; } else { related = this . _prepareCollection ( ) ; } // By now, both `merge` and `parse` will already have been executed for models if they were specified. // Disable them to prevent additional calls. related . set ( toAdd , _ . defaults ( { merge : false , parse : false } , options ) ) ; } // Remove entries from `keyIds` that were already part of the relation (and are thus 'unchanged') this . keyIds = _ . difference ( this . keyIds , _ . pluck ( related . models , 'id' ) ) ; return related ; }
Find related Models.
@param {Object} [options]
@return {Backbone.Collection}
Find related Models .