У меня есть сущность, которая простирается от других, например:
public class House extends Building{
public Integer idHouse
}
public class Building extends Structure{
}
public class Structure {
public Integer field1;
}
Мне нужно проверить изменения в объектах House, но я не хочу включать поле Structure.field1. Я пробовал это:
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();
Но, похоже, игнорируется «IgnoeredPropertied». Я также пытался сопоставить класс структуры, но не могу, потому что у него нет идентификатора.
Любые идеи о том, как я могу игнорировать field1? Спасибо!