lib/mongodb/MongoDBCollection.js
function() {
    var self = this

    // initialize all operations
    Collection.prototype._init.call(this)

    // XXX: note, this is side effecting operation.parameters by assigning to the
    //      original config... this should probably be changed

    // set the query schema if defined
    if (!_.isNil(this.querySchema)) {
      this.COLLECTION_QUERY_OPERATIONS.forEach(function(op) {
        var config = self.getOperationConfig(op)
        if (config.supportsQuery) {
          _.set(config, 'parameters.query.schema', _.cloneDeep(self.querySchema))
        }
      })
    }
    // set the update schema if defined
    if (!_.isNil(this.updateSchema)) {
      var config = self[self.getOperationConfigFieldName('update')]
      _.set(config, 'parameters.update.schema', _.cloneDeep(self.updateSchema))
    }
    // set the updateObject schema if defined
    if (!_.isNil(this.updateObjectSchema)) {
      var config = self[self.getOperationConfigFieldName('updateObject')]
      _.set(config, 'parameters.update.schema', _.cloneDeep(self.updateObjectSchema))
    }
  }
function() {
    var self = this

    // initialize all operations
    Collection.prototype._init.call(this)

    // XXX: note, this is side effecting operation.parameters by assigning to the
    //      original config... this should probably be changed

    // set the query schema if defined
    if (!_.isNil(this.querySchema)) {
      this.COLLECTION_QUERY_OPERATIONS.forEach(function(op) {
        var config = self.getOperationConfig(op)
        if (config.supportsQuery) {
          _.set(config, 'parameters.query.schema', _.cloneDeep(self.querySchema))
        }
      })
    }
    // set the update schema if defined
    if (!_.isNil(this.updateSchema)) {
      var config = self[self.getOperationConfigFieldName('update')]
      _.set(config, 'parameters.update.schema', _.cloneDeep(self.updateSchema))
    }
    // set the updateObject schema if defined
    if (!_.isNil(this.updateObjectSchema)) {
      var config = self[self.getOperationConfigFieldName('updateObject')]
      _.set(config, 'parameters.update.schema', _.cloneDeep(self.updateObjectSchema))
    }
  }
function ( ) { var self = this // initialize all operations Collection . prototype . _init . call ( this ) // XXX: note, this is side effecting operation.parameters by assigning to the //      original config... this should probably be changed // set the query schema if defined if ( ! _ . isNil ( this . querySchema ) ) { this . COLLECTION_QUERY_OPERATIONS . forEach ( function ( op ) { var config = self . getOperationConfig ( op ) if ( config . supportsQuery ) { _ . set ( config , 'parameters.query.schema' , _ . cloneDeep ( self . querySchema ) ) } } ) } // set the update schema if defined if ( ! _ . isNil ( this . updateSchema ) ) { var config = self [ self . getOperationConfigFieldName ( 'update' ) ] _ . set ( config , 'parameters.update.schema' , _ . cloneDeep ( self . updateSchema ) ) } // set the updateObject schema if defined if ( ! _ . isNil ( this . updateObjectSchema ) ) { var config = self [ self . getOperationConfigFieldName ( 'updateObject' ) ] _ . set ( config , 'parameters.update.schema' , _ . cloneDeep ( self . updateObjectSchema ) ) } }
***************************************************************************
_init
*************************************************************************** _init