Formula mappings are currently not supported - Hibernate ORM Envers

Viewed 2549

I use Hibernate Envers:

@Entity 
@Table(name = "user")
@Audited
class User()
{
    private String id;
    @Formula("(SELECT name FROM other c where c.id = id)")
    private Integer name;
}

it throws:

[org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.envers.configuration.internal.metadata.FormulaNotSupportedException: Formula mappings (aside from @DiscriminatorValue) are currently not supported

How to calculate entity attributes with @Formula and Hibernate Envers?

FYI When I remove Hibernate Envers it works properly.

1 Answers
Related