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

findShadows query with exact commitId returns shadows for other commits if non-existing commitId is given #660

Closed
olekihnatowicz opened this Issue Apr 11, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@olekihnatowicz
Contributor

olekihnatowicz commented Apr 11, 2018

def "should return exact commit for query with commitId"() {
    given:
        def ref1 = new SnapshotEntity(id: 2)
        def ref2 = new SnapshotEntity(id: 3)
        javers.commit("a", ref1)
        javers.commit("a", ref2)

        def entity = new SnapshotEntity(id: 1, listOfEntities: [ref1,ref2])
        javers.commit("a", entity)

    when:
        def shadows = javers.findShadows(
                        byInstanceId(1, SnapshotEntity)
                        .withScopeDeepPlus(1)
                        .withCommitId(CommitId.valueOf("543434.0")) //non-existing commitId
                        .build())
                .collect{it.get()}

    then:
        shadows.size() == 0
}

This test fails since javers version 3.7.5

olekihnatowicz added a commit to olekihnatowicz/javers that referenced this issue Apr 11, 2018

@olekihnatowicz

This comment has been minimized.

@bartoszwalacik

This comment has been minimized.

Member

bartoszwalacik commented Apr 12, 2018

thanks for reporting

bartoszwalacik added a commit that referenced this issue Apr 22, 2018

bartoszwalacik added a commit that referenced this issue Apr 22, 2018

@bartoszwalacik

This comment has been minimized.

Member

bartoszwalacik commented Apr 22, 2018

Fix released in 3.9.2

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