     for property, id of projection.collections
       collectionIds.push(id) if projection[property]
     return collectionIds
+
+  _logMsg: (message) ->
+    "#{@configuration.appId}: #{this}: #{message}"


  dependencies: {
    commitStore: 'Space.eventSourcing.CommitStore'
    injector: 'Injector'
    mongo: 'Mongo'
  }

  rebuild: (projections, options) ->

      if inMemoryData.length
        realCollection.batchInsert inMemoryData
      else
        @log.warning(@_logMsg("No data to insert after replaying events for #{collectionId}"))
      # Restore original collections
      @injector.override(collectionId).to realCollection

