     @_repositoryInstances = {}
     @_storeClasses = {}
     @_storeInstances = {}
-    @_pendingOperations = []
+    @_pendingPromises = []
     @_eventBus         = new @_eventric.EventBus @_eventric
     @projectionService = new @_eventric.Projection @_eventric, @
     @log = @_eventric.log

    repositoriesCache[aggregateName]


  _addPendingOperation: (pendingOperation) ->
    errorSuppressedPendingOperation = pendingOperation.catch ->
    @_pendingOperations.push errorSuppressedPendingOperation
    errorSuppressedPendingOperation.then =>
      @_pendingOperations.splice @_pendingOperations.indexOf(errorSuppressedPendingOperation), 1


  query: (queryName, params) ->

        err = new Error err
        return reject err

      Promise.resolve @_queryHandlers[queryName].apply @_di, [params]
      .then (result) =>
        @log.debug "Completed Query #{queryName} with Result #{result}"
        resolve result
      .catch reject


  _verifyContextIsInitialized: (methodName) ->
