I am using 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; }
he throws:
[org / springframework / downloads / Auto Config / ORM / JPA / HibernateJpaAutoConfiguration.class]: The init method call failed; nested exception org.hibernate.envers.configuration.internal.metadata.FormulaNotSupportedException: Formula mappings (except @DiscriminatorValue) are not currently supported
How to calculate entity attributes using @Formula and Hibernate Envers?
FYI When I remove Hibernate Envers, it works correctly.
, Envers @Formula , . JIRA HHH-11785 .
@Formula
, @NotAudited, Envers . , , , .
@NotAudited
:
@Entity @Audited class User { @Formula("SELECT name FROM Other ...") @NotAudited private String name; // other attributes }
Source: https://habr.com/ru/post/1678410/More articles:How can I identify users who performed an action X times? [Passionate] - data-modelingRecursive built-in anonymous function in script - anonymous-functionExtJs Bilateral binding between parent and child components - javascriptC WikiBooks - Как C небольшой, "что вы видите, все, что вы получаете"? - cSum of digits in a numeric matrix per line - matrixHow do you know where the raw promise occurred? - javascriptionic 2 - inappbrowser "browser.on (...). subscribe is not a function of" error - cordovaRestart a generator that consumes a reusable iterator - pythonIonic 2 - Inappbrowser event fire after the second call - cordova-pluginsJupyter Notebook: interactive plot with widgets - pythonAll Articles