   generateDomainEvent: (eventName, params={}) ->
     eventParams =
       name: eventName
-      aggregate: @_getMetaData()
+      aggregate:
+        id: @id
+        name: @_name
 
     changes = @_getChanges()
     if Object.keys(changes).length > 0

class Aggregate

  constructor: (name, definition, props) ->
    @_entityName        = name
    @_props             = {}
    @_propsChanged      = {}
    @_domainEvents      = []


  command: (command, errorCallback) ->
    if command.name not of @_root
      err = new Error "Given commandName '#{command.name}' not found as method in the #{@_name} Aggregate Root"
      errorCallback err
      return

