休眠envers mapkeyenumerated

问题描述

我将hibernate envers与包含@MapKeyEnumerated的auditstrategy和映射类一起使用

Class 'Input' not found

使用休眠5.4.3休眠envers会生成以下内容

 @OnetoMany(fetch = FetchType.LAZY,cascade = CascadeType.ALL,orphanRemoval = true)
@MapKeyEnumerated(EnumType.STRING)
@JoinColumn(name = "cp_watching_point_id")
private final Map<TemporalContext,LineCriterionGroups> temporalContexts = new HashMap<>();

,一切正常。但是,如果我将休眠版本更新为5.4.6或最后一个5.4.22,则会生成以下内容

select ee__ from WatchingPoint_LineCriterionGroups_AUD ee__ where ee__.originalId.mapkey =  :_p0  and ee__.originalId.WatchingPoint_id =  :_p1  and ee__.originalId.temporalContexts_id = :_p2 and ee__.REvend is null

生成如下错误

select ee__ from WatchingPoint_LineCriterionGroups_AUD ee__ where ee__.originalId.temporalContexts_KEY = :_p0 and ee__.originalId.WatchingPoint_id = :_p1 and ee__.originalId.temporalContexts_id = :_p2 and ee__.REvend is null

如您所见,字段 org.hibernate.QueryException: Could not resolve property: originalId.temporalContexts_KEY of: WatchingPoint_LineCriterionGroups_AUD ... 变为originalId.mapkey

我不知道为什么,而且因为无法更新休眠版本而陷入困境。

有人遇到了同样的问题并找到了解决方案吗?

谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...