Hi,
I’m trying to make use of the example found within the chapter http://www.axonframework.org/docs/2.0/single.html#d4e750, and I’m currently depending on axon-core 2.0.3.
Questions:
- When extending AbstractEventSourcedAggregateRoot it has more/changed methods to implement (getChildEntities, handle, getIdentifier) then shown in the example. I assume the example isn’t updated?
- The signature of handle method has changed from taking a DomainEvent into taking a DomainEventMessage as input. Assume example isn’t updated?
- The following code snippet from handle method:
// make sure to always initialize the aggregate identifier
this.aggregateIdentifier = ((MyAggregateCreatedEvent) this.getPayload()).getMyIdentifier();
should maybe be updated to:
// make sure to always initialize the aggregate identifier
this.aggregateIdentifier = ((MyAggregateCreatedEvent) dem.getPayload()).getMyIdentifier(); // where dem is the variable name of the DomainEventMessage taken as input
- Could you also provide code for how the MyAggregateCreatedEvent looks like to make the example complete?
Thanks in advance!
Regards,
Viggo