我使用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;
}
它抛出:
[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
如何使用@Formula和Hibernate Envers计算实体属性?
仅供参考当我删除Hibernate Envers时,它可以正常工作.
最佳答案
原文链接:https://www.f2er.com/spring/432636.html