lib/definitions/collection.js
function (id, callback) {
    this.loadViewModel(id, function (err, vm) {
      if (err) {
        return callback(err);
      }

      if (!vm || vm.actionOnCommit === 'create') {
        return callback(null, null);
      }

      callback(null, vm);
    });
  }
function (id, callback) {
    this.loadViewModel(id, function (err, vm) {
      if (err) {
        return callback(err);
      }

      if (!vm || vm.actionOnCommit === 'create') {
        return callback(null, null);
      }

      callback(null, vm);
    });
  }
function ( id , callback ) { this . loadViewModel ( id , function ( err , vm ) { if ( err ) { return callback ( err ) ; } if ( ! vm || vm . actionOnCommit === 'create' ) { return callback ( null , null ) ; } callback ( null , vm ) ; } ) ; }
Loads a viewModel object by id if exists.
@param {String}   id       The viewModel id.
@param {Function} callback The function, that will be called when the this action is completed.
`function(err, vm){}` vm is of type Object or null
Loads a viewModel object by id if exists .