Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Is there a way to ignore a field when writing history table with @Customizer
Is there a way to ignore a field when writing history table with @Customizer [message #1858623] Wed, 12 April 2023 09:09
Renato Freire is currently offline Renato FreireFriend
Messages: 2
Registered: April 2023
Junior Member
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

Previous Topic:Exclude field when creating history table by using @Customizer
Next Topic:Analyze Profiler Logs
Goto Forum:
  


Current Time: Fri Apr 19 18:28:47 GMT 2024

Powered by FUDForum. Page generated in 0.02950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top