I have a class which is annotated with eclipselink @Customizer.
That customizer, uses a custom customizer that inherits from DescriptorCustomizer. In customize function I have a HistoryPolicy in order to create a history table for the annotated class.
Down below I leave an example:
public class MyCustomizer implements DescriptorCustomizer {
@Override
public void customize(ClassDescriptor cd) {
HistoryPolicy policy = new HistoryPolicy();
policy.addHistoryTableName("public" + ".history_table");
policy.addStartFieldName("start_ts");
policy.addEndFieldName("end_ts");
cd.setHistoryPolicy(policy);
}
}
@Entity
@Customizer(MyCustomizer.class)
public class myClass {
@Column(name = "field_To_Track")
private Integer fieldToBeTracked;
@Column(name = "field_Not_To_Track")
private Integer fieldNotToBeTracked;
}
I want to ignore a fields from being the reason why a row it's written in the history table. That way, every new row written in the table it's not because of an update on that column. Is that possible?
[Updated on: Thu, 13 April 2023 05:12]
Report message to a moderator