Formula mappings are currently not supported - Hibernate ORM Envers Formula mappings are currently not supported - Hibernate ORM Envers spring spring

Formula mappings are currently not supported - Hibernate ORM Envers


The problem is that you're asking Envers to audit a @Formula annotated column, which presently isn't supported. I have opened JIRA HHH-11785 for the sole purpose of looking into this farther.

However, you should be able to annotate the formula field with @NotAudited and Envers should integrate just fine with that configuration. The real issue is that it fails when it finds the formula-based field's history is to be tracked.

As an example:

@Entity@Auditedclass User {  @Formula("SELECT name FROM Other ...")  @NotAudited  private String name;  // other attributes}