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

Add local version field in snapshots #294

Closed
wants to merge 7 commits into from

Conversation

milanov
Copy link
Contributor

@milanov milanov commented Jan 9, 2016

I'm happy to accept any comments, suggestions, etc :)

@@ -26,6 +26,7 @@
private final CdoSnapshotState state;
private final SnapshotType type;
private final List<String> changed;
private final Long version;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we dont want version to be null, so maybe primitive long?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll change that. Do you prefer for me to simply commit this change or to squash it with the previous (I didn't find contribution guidelines)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, we need to write contribution guidelines. Just push another commit but wait a while, i will take a deeper look at this PR at the evening

@bartoszwalacik bartoszwalacik self-assigned this Jan 9, 2016
@@ -41,6 +40,7 @@ class CdoSnapshotTypeAdapterTest extends Specification {
json.globalId.entity == "org.javers.core.model.DummyUser"
json.globalId.cdoId == "kaz"
json.type == "INITIAL"
json.version == 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to test it in a different (minimal) way.
So test new version field only in 2 basic tests:
def "should serialize CdoSnapshot to Json"() and
def "should deserialize CdoSnapshot"()
and not to change other tests.
Deserializer should not break if field is missing (and it will be missing if users ugrade to new JaVers version and will load snapshots created in old JaVers version).

@bartoszwalacik
Copy link
Member

I did fixes on my branch, and just merged all into master

@bartoszwalacik
Copy link
Member

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

Successfully merging this pull request may close these issues.

None yet

2 participants