docs/code-frags/counter-col/lib/CounterCol.js
function(objects, options) {
          var idSet = new Set(objects.map(function(object) {
            return object._id
          }))
          if (idSet.length < objects.length) {
            throw new this.getService().errors.BadRequest('Duplicate IDs')
          }
          this.cache = objects
          return objects
        }
function(objects, options) {
          var idSet = new Set(objects.map(function(object) {
            return object._id
          }))
          if (idSet.length < objects.length) {
            throw new this.getService().errors.BadRequest('Duplicate IDs')
          }
          this.cache = objects
          return objects
        }
post-findObject-memCacheCounterAdvanced pre-save-memCacheCounterAdvanced