lib/definitions/viewBuilder.js
function (evt, query, callback) {
    var self = this;
    this.findViewModels(query, function (err, vms) {
      if (err) {
        debug(err);
        return callback(err);
      }

      async.map(vms, function (vm, callback) {
        self.handleOne(vm, evt, function (err, notification) {
          if (err) {
            debug(err);
            return callback(err);
          }

          callback(null, notification);
        });
      }, function (err, notifications) {
        if (err) {
          debug(err);
          return callback(err);
        }

        notifications = _.filter(notifications, function (n) {
          return !!n;
        });

        callback(null, notifications);
      });
    });
  }
function (evt, query, callback) {
    var self = this;
    this.findViewModels(query, function (err, vms) {
      if (err) {
        debug(err);
        return callback(err);
      }

      async.map(vms, function (vm, callback) {
        self.handleOne(vm, evt, function (err, notification) {
          if (err) {
            debug(err);
            return callback(err);
          }

          callback(null, notification);
        });
      }, function (err, notifications) {
        if (err) {
          debug(err);
          return callback(err);
        }

        notifications = _.filter(notifications, function (n) {
          return !!n;
        });

        callback(null, notifications);
      });
    });
  }
function ( evt , query , callback ) { var self = this ; this . findViewModels ( query , function ( err , vms ) { if ( err ) { debug ( err ) ; return callback ( err ) ; } async . map ( vms , function ( vm , callback ) { self . handleOne ( vm , evt , function ( err , notification ) { if ( err ) { debug ( err ) ; return callback ( err ) ; } callback ( null , notification ) ; } ) ; } , function ( err , notifications ) { if ( err ) { debug ( err ) ; return callback ( err ) ; } notifications = _ . filter ( notifications , function ( n ) { return ! ! n ; } ) ; callback ( null , notifications ) ; } ) ; } ) ; }
Handles denormalization with a query instead of an id.
@param {Object}   evt      The event object.
@param {Object}   query    The query object.
@param {Function} callback The function, that will be called when this action is completed.
`function(err, notification){}`
Handles denormalization with a query instead of an id .