Skip to content

Array of ValueObjects diff issue #207

Description

@floresek

Hi again.

I'd like to report an diff isue.

class Master {
    @Id
    String id;

    Detail[] array;

    public Master(String id) {
        this.id = id;
    }

}

@ValueObject
class Detail {
    String data;

    public Detail(String data) {
        this.data = data;
    }
}

        ...
        Master master = new Master("3");
        master.array = new Detail[] { new Detail("details-array")};
        javers.commit("anonymous", master);
        javers.commit("anonymous", master);
        javers.commit("anonymous", master);
        List<Change> changes = javers
                .findChanges(QueryBuilder.byInstanceId("3", Master.class)
                        .withNewObjectChanges(true)
                        .build());
        String changeLog = javers.processChangeList(changes, getChangeLogger());
        ...

Second and third commit save Master snapshot with 'array' property changed (although no change occurred).
processChangeList traces only one initial change.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions