gonella
gonella

Reputation: 186

Javers - Select attributes to compare

Is there any way to compare two objects ONLY select attributes I want? I understand we can use ignore mechanism, but if it is a large object I will need to ignore many attributes, in this cases best option is select ONLY what we want.

Any clue?

Thanks,

Upvotes: 1

Views: 304

Answers (1)

gonella
gonella

Reputation: 186

One of the options is use a comparator:

    javersBuilder.registerCustomComparator(new JaversClazzCustomizedComparator(), ClazzCustomized.class).build();

Internally you could create a equal for each attribute.

Thanks,

Upvotes: 1

Related Questions