0

Using hibernate with Oracle db 11g express edition release 2.

When using the annotation @Versioned for a table "Organizations" for example,

hibernate seems to try to create a table Public.Organizations_versions with some columns.

The problem is that some of those columns (_revision, _revision_type) start with an underscore and Oracle db does not allow creating a table with columns who start with underscore.

Any solutions ?

Thanks.

4

1 回答 1

0

更改您的 Envers 版本。如果我记得,版本 1.0.0 是一个非常古老的版本。至少使用:

1.2.2.GA-hibernate3.3

以下是Envers FAQ的摘录:

对于当前的Hibernate-4/3.6兼容版本,您应该使用新的组和工件 ID。使用此依赖项:

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-envers</artifactId>
  <version>4.1.0-Final</version>
</dependency>

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-envers</artifactId>
  <version>3.6.10-Final</version>
</dependency>

(您希望将版本号与例如 hibernate-core 和 hibernate-entitymanager 匹配)

如果您想使用较旧的Hibernate-3.3兼容版本,请使用旧组和工件,将此依赖项添加到您的 pom.xml:

<dependency>
  <groupId>org.jboss.envers</groupId>
  <artifactId>jboss-envers</artifactId>
  <version>1.2.2.GA-hibernate-3.3</version>
</dependency>
于 2012-11-28T21:21:43.470 回答