code: function ( parentModel, ids, associations, done ) {
  
  		async.reduce( associations, {}, function ( associatedRecords, association, next ) {
  			if ( association.include === "index" ) {
  				var assocModel = null;
  				var assocCriteria = {};
  
  				if ( association.through ) {
  					assocModel = sails.models[ association.through ];
  					assocCriteria[ parentModel.identity ] = ids;
  					assocModel.find( assocCriteria ).exec( function ( err, recs ) {
  						associatedRecords[ association.alias ] = recs;
  						next( err, associatedRecords );
  					} );
  				} else if ( association.collection ) {
  					assocModel = sails.models[ association.collection ];
  					assocCriteria[ association.via ] = ids;
  					assocModel.find( assocCriteria ).exec( function ( err, recs ) {
  						associatedRecords[ association.alias ] = recs;
  						next( err, associatedRecords );
  					} );
  				} else if ( association.model ) {
  					// belongs-To associations should already have the index
  					assocModel = sails.models[ association.model ];
  					next( null, associatedRecords );
  				}
  				if ( assocModel === null ) return next( new Error( "Could not find associated model for: " + association.alias ) );
  			} else {
  				return next( null, associatedRecords );
  			}
  		}, done );
  
  	}
docs: helper function to populate a record with an array for indexes for associated models, running various Waterline queries on the join tables if neccessary ( defined as: include -> index )
  @param  {Waterine Collection}   parentModel  [description]
  @param  {Array|Integer}   ids          [description]
  @param  {[type]}   associations [description]
  @param  {Function} done         [description]