Skip to content

Instantly share code, notes, and snippets.

@elibroftw
Last active March 29, 2021 21:23
Show Gist options
  • Save elibroftw/1c266ff334d5afd81c690d3848c31e70 to your computer and use it in GitHub Desktop.
Save elibroftw/1c266ff334d5afd81c690d3848c31e70 to your computer and use it in GitHub Desktop.
Javers Example 3
javers Javers = JaversBuilder.javers()
// ...
// ignore Entity/Key Object
.registerEntity(EntityDefinitionBuilder.entityDefiniition(Square.class)
.withIdPropertyName("key")
.withIgnoredProperties("lastUpdate", "comments")
.build())
// ignore Value Object
.registerValueObject(new ValueObjectDefinitioin(Vertex.class, Arrays.asList("lastUpdate", "comments"))
// you can use both multiple times
// ...
.build();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment