Closed epsilonhalbe closed 1 year ago
@epsilonhalbe any time an aggregate is loaded in an event sourced system, a new Aggregate
is created (via the Default
trait) and all previous events are applied to that aggregate. This means it will be used once every time a command is fired.
In the event you use aggregate sourcing, the Default
trait will only be used when the first command is fired, the aggregate state will be persisted after that.
Thanks for the interest!
Thanks!
Why is it necessary to have the Default trait for aggregates? Is this to avoid a "Aggregate not found error"?
I have used CQRS in haskell, and reading this rust implementation is really neat and tidy, good work!