This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.

History Configuration

History Relation Configuration

By default, any relations to non-lookup entities are not included in the entity history. Such relations can explicitly included with the HistoryRelationInclusionContribution bean.

Include Classroom_relAdmin, Classroom_relModerator and Classroom_relUser in Classroom entity history
@Bean
public HistoryRelationInclusionContribution classRoomUserRelations() {
    return new HistoryRelationInclusionContribution("Classroom", Set.of("relAdmin", "relModerator", "relUser"));
}

Additionally, fields, lookup relations and entire entity models can be explicitly excluded from the history with the HistoryExclusionContribution bean.

Exclude Thumbnail entity from history
@Bean
public HistoryExclusionContribution thumbnailHistoryExclusion() {
    HistoryExclusionContribution contribution = new HistoryExclusionContribution();
    contribution.setModelName("Thumbnail");
    return contribution;
}
Exclude User_relAffiliation from User entity history
@Bean
public HistoryExclusionContribution userAffiliationExclusion() {
    HistoryExclusionContribution contribution = new HistoryExclusionContribution();
    contribution.setModelName("User");
    contribution.setRelationName("relAffiliation");
    return contribution;
}
Exclude entrance and exit fields on User from entity history
@Bean
public HistoryExclusionContribution userEntranceExitHistoryExclusionContribution() {
    HistoryExclusionContribution contribution = new HistoryExclusionContribution();
    contribution.setModelName("User");
    contribution.setFieldName("entrance,exit");
    return contribution;
}