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

Cqrs.Domain.AggregateRoot.ApplyChange stores Changes in the wrong order #60

Closed
cdmdotnet opened this Issue Jul 17, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@cdmdotnet
Copy link
Collaborator

cdmdotnet commented Jul 17, 2017

The current execution is
Changes = new ReadOnlyCollection<IEvent<TAuthenticationToken>>(new []{@event}.Concat(Changes).ToList());
and it should probably be
Changes = new ReadOnlyCollection<IEvent<TAuthenticationToken>>(Changes.Concat(new[] { @event }).ToList());
this way the order events are applied is retained as that determines the order of event storing.

Cqrs.Domain.AggregateRepository.Save will also apply the same version number to all events applied which will be problematic.

@cdmdotnet cdmdotnet added the bug label Jul 17, 2017

@cdmdotnet cdmdotnet added this to the 2.2 milestone Jul 17, 2017

@cdmdotnet cdmdotnet self-assigned this Jul 17, 2017

@cdmdotnet cdmdotnet changed the title Cqrs.Domain.AggregateRoot.ApplyChange stores Changes int he wrong order Cqrs.Domain.AggregateRoot.ApplyChange stores Changes in the wrong order Jul 17, 2017

cdmdotnet pushed a commit that referenced this issue Jul 17, 2017

cdmdotnet added a commit that referenced this issue Jul 17, 2017

Merge pull request #61 from Chinchilla-Software-Com/features/WebJobs
#60 Fixing ordering... a long unseen bug.

@cdmdotnet cdmdotnet closed this Jul 17, 2017

cdmdotnet pushed a commit that referenced this issue Jul 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment