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


    domainEvent = new DomainEvent eventParams
    @_domainEvents.push domainEvent


  _getMetaData: ->
    id: @id
    name: @_entityName


  _getChanges: ->

class Aggregate

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