lib/packages/core-classes.js
function(record, foreign_key) {

		if (foreign_key in this._collections_by_foreign_id) {

			this._collections_by_foreign_id[foreign_key].push(record);

		} else {

			this._collections_by_foreign_id[foreign_key] = [record];

		}

	}
function(record, foreign_key) {

		if (foreign_key in this._collections_by_foreign_id) {

			this._collections_by_foreign_id[foreign_key].push(record);

		} else {

			this._collections_by_foreign_id[foreign_key] = [record];

		}

	}
function ( record , foreign_key ) { if ( foreign_key in this . _collections_by_foreign_id ) { this . _collections_by_foreign_id [ foreign_key ] . push ( record ) ; } else { this . _collections_by_foreign_id [ foreign_key ] = [ record ] ; } }
Add record to local collection of records, grouped by this field
@param {Lava.data.Record} record
@param {string} foreign_key
Add record to local collection of records grouped by this field