lib/definitions/aggregate.js
function (id) {
    if (!id || !_.isString(id)) {
      var err = new Error('Please pass a valid string as id!');
      debug(err);
      throw err;
    }

    return new AggregateModel(id, this.modelInitValues);
  }
function (id) {
    if (!id || !_.isString(id)) {
      var err = new Error('Please pass a valid string as id!');
      debug(err);
      throw err;
    }

    return new AggregateModel(id, this.modelInitValues);
  }
function ( id ) { if ( ! id || ! _ . isString ( id ) ) { var err = new Error ( 'Please pass a valid string as id!' ) ; debug ( err ) ; throw err ; } return new AggregateModel ( id , this . modelInitValues ) ; }
Returns a new aggregate model, to be used in the command and event functions.
@param {String} id The aggregate id.
@returns {AggregateModel}
Returns a new aggregate model to be used in the command and event functions .