lib/definitions/collection.js
function (repository) {
    if (!repository || !_.isObject(repository)) {
      var err = new Error('Please pass a valid repository!');
      debug(err);
      throw err;
    }

    var extendObject = {
      collectionName: this.name,
      indexes: this.indexes,
    };

    if (repository.repositoryType && this.repositorySettings[repository.repositoryType]) {
      extendObject.repositorySettings = {};
      extendObject.repositorySettings[repository.repositoryType] = this.repositorySettings[repository.repositoryType];
    }

    this.repository = repository.extend(extendObject);
  }
function (repository) {
    if (!repository || !_.isObject(repository)) {
      var err = new Error('Please pass a valid repository!');
      debug(err);
      throw err;
    }

    var extendObject = {
      collectionName: this.name,
      indexes: this.indexes,
    };

    if (repository.repositoryType && this.repositorySettings[repository.repositoryType]) {
      extendObject.repositorySettings = {};
      extendObject.repositorySettings[repository.repositoryType] = this.repositorySettings[repository.repositoryType];
    }

    this.repository = repository.extend(extendObject);
  }
function ( repository ) { if ( ! repository || ! _ . isObject ( repository ) ) { var err = new Error ( 'Please pass a valid repository!' ) ; debug ( err ) ; throw err ; } var extendObject = { collectionName : this . name , indexes : this . indexes , } ; if ( repository . repositoryType && this . repositorySettings [ repository . repositoryType ] ) { extendObject . repositorySettings = { } ; extendObject . repositorySettings [ repository . repositoryType ] = this . repositorySettings [ repository . repositoryType ] ; } this . repository = repository . extend ( extendObject ) ; }
Injects the needed repository.
@param {Object} repository The repository object to inject.
Injects the needed repository .