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.
@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.
@Bean public HistoryExclusionContribution thumbnailHistoryExclusion() { HistoryExclusionContribution contribution = new HistoryExclusionContribution(); contribution.setModelName("Thumbnail"); return contribution; }@Bean public HistoryExclusionContribution userAffiliationExclusion() { HistoryExclusionContribution contribution = new HistoryExclusionContribution(); contribution.setModelName("User"); contribution.setRelationName("relAffiliation"); return contribution; }@Bean public HistoryExclusionContribution userEntranceExitHistoryExclusionContribution() { HistoryExclusionContribution contribution = new HistoryExclusionContribution(); contribution.setModelName("User"); contribution.setFieldName("entrance,exit"); return contribution; }