Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the semantic of the Version property in the Event class ? #31

Open
EnricoMassone opened this issue Jun 1, 2019 · 0 comments
Open

Comments

@EnricoMassone
Copy link

EnricoMassone commented Jun 1, 2019

Hi @gregoryyoung ,

could you please explain what is the intended semantic of the Version property in the Event class ?

Is it meant to be the version of the aggregate at the time the event was raised or the version of the aggregate obtained after the event is applied to the aggregate ?

Here is an example to summarize my doubt.

Let's imagine of having an aggregate currently at version 5 materialized from the event store. Then, we issue a command to the aggregate and an event is raised so that, after applying the event to the aggregate state, the new aggregate version is 6.
In such a scenario, do you expect @event.Version = 5 or @event.Version = 6 ? Based on my understanding, it should be @event.Version = 6. Is it correct ?

Thanks for the clarification.

Enrico

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant