Skip to content
This repository has been archived by the owner on Feb 16, 2019. It is now read-only.

Fix ExpectedVersion #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix ExpectedVersion #34

wants to merge 1 commit into from

Conversation

prolic
Copy link

@prolic prolic commented Jul 8, 2018

EmptyStream is 0, add missing Invalid

EmptyStream is 0, add missing Invalid
@Narvalex
Copy link

Narvalex commented Jul 9, 2018

Isn´t the stream version zero based? Why change -1 to 0?

@prolic
Copy link
Author

prolic commented Jul 9, 2018

@Narvalex Thanks for your question. You can see the comment here: https://github.com/EventStore/ClientAPI.NetCore/blob/master/src/EventStore.ClientAPI.NetCore/ExpectedVersion.cs#L13 which obviously claims something different then the code, and second, you can check the server implementation here: https://github.com/EventStore/EventStore/blob/master/src/EventStore.Core/Data/ExpectedVersion.cs
On the other hand, at the server side this value is commented out, see https://github.com/EventStore/EventStore/blob/master/src/EventStore.Core/Data/ExpectedVersion.cs#L7.

@Narvalex
Copy link

Narvalex commented Jul 9, 2018

You are right, @prolic ! thanks for your kind response. I didn't see that the NoStream constant (-1) is still there. I was worry it will break my event sourcing framework library.

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

Successfully merging this pull request may close these issues.

2 participants