I have an entity which extends from anothers, like that:
public class House extends Building{
public Integer idHouse
}
public class Building extends Structure{
}
public class Structure {
public Integer field1;
}
I need to audit changes in House objects but I don't want to include Structure.field1 field. I tried this:
String skippedFields = ["field1"];
EntityDefinition houseEntity =
EntityDefinitionBuilder.entityDefinition(House.class)
.withIdPropertyName("idHouse")
.withIgnoredProperties(Arrays.asList(skippedFields))
.build();
Javers javers = JaversBuilder.javers()
.registerEntity(expedienteEntity)
.registerJaversRepository(sqlRepository).build();
But it seams to ignore the "IgnoeredPropertied". I also tried to map the structure class, but I can't because it doesn't have an id.
Any ideas on how can I ignore field1? Thx!