Envers is looking for an extra "join" auditing table when @JoinColumn is used in EAP 6
Issue
- The following entity association is defined
@Entity
@Audited
public class Product {
...
private Set<Part> parts = new HashSet<Part>();
...
@OneToMany
@JoinColumn(name = "productId")
public Set<Part> getParts() {
return parts;
}
...
}
@Entity
@Audited
public class Part {
@Id
private int partId;
private String productId;
}
- The
@JoinColumnannotation imposes a requirement for the existence of a table named<one>_<many>_<auditing_suffix>(e.g.Product_Part_aud). - If the table does not exist (and automatic table creation is not used), the following exception may be raised:
HHH000262: Table not found: Product_Part_aud
Environment
- JBoss Enterprise Application Platform (EAP) 6
- Hibernate 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.