server/boot/load-model.js
function stageModels(app, models, cb) {
  logger.debug('stageModels entry');
  async.forEach(models,
    function(model, callback) {
      app.dataSources.db.automigrate(
        model.name,
        function(err) {
          callback(err);
        }
      );
    },
    function(err) {
      logger.debug('stageModels exit');
      cb(err);
    }
  );
}
function stageModels(app, models, cb) {
  logger.debug('stageModels entry');
  async.forEach(models,
    function(model, callback) {
      app.dataSources.db.automigrate(
        model.name,
        function(err) {
          callback(err);
        }
      );
    },
    function(err) {
      logger.debug('stageModels exit');
      cb(err);
    }
  );
}
function stageModels ( app , models , cb ) { logger . debug ( 'stageModels entry' ) ; async . forEach ( models , function ( model , callback ) { app . dataSources . db . automigrate ( model . name , function ( err ) { callback ( err ) ; } ) ; } , function ( err ) { logger . debug ( 'stageModels exit' ) ; cb ( err ) ; } ) ; }
Stages the models for use by subsequent functions
@param {???} app - loopback application
@param {Array} models - instances of ModelType to populate
with data
@param {callback} cb - callback that handles the error or
successful completion
Stages the models for use by subsequent functions