With Hibernate Envers, is it possible to get the current audited table? I took the example from the doc but I add an extra column tableName
:
@Entity
@RevisionEntity(ExampleListener.class)
public class ExampleRevEntity extends DefaultRevisionEntity {
private String username;
private tableName;
...
}
And the listener:
public class ExampleListener implements RevisionListener {
public void newRevision(Object revisionEntity) {
ExampleRevEntity exampleRevEntity = (ExampleRevEntity) revisionEntity;
...
exampleRevEntity.setUsername(...);
exampleRevEntity.setTableName(...); // How to get the current table audited table?
}
}
I found this old post Get audit table name from hibernate envers? but without a relevant answer. Thanks a lot