event-centric / EventCentric.Core

Event Sourcing and CQRS in PHP
MIT License
126 stars 9 forks source link

OptimisticConcurrencyFailed when committing an existing aggregate. #24

Closed vincentvandijk closed 9 years ago

vincentvandijk commented 9 years ago

Exception: Qanda\Research\Domain\Common\Persistence\OptimisticConcurrencyFailed

This line creates a new stream, but doesn't load the already committed events from the event store, therefor the expected stream version mismatches. The method createStream() should be replaced with openOrCreateStream().

Correct?

ianlet commented 9 years ago

I think this problem has already been signaled here #2. Is it the same issue?

vincentvandijk commented 9 years ago

Jup, will close this one.