@Index annotation ommitted while creating audit tables
------------------------------------------------------
Key: HHH-6035
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6035
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 4.0.0.Alpha1
Environment: All, Tested on Oracle 10g
Reporter: Lukasz Antoniak
Priority: Minor
Assume audited entity configured as follows:
{code:title=Address.java|borderStyle=solid}
@Entity
@Table(appliesTo = "Address", indexes = { @Index(name="idx",
columnNames = { "streetName", "houseNumber" } ) } )
public class Address {
@Id
@GeneratedValue
private int id;
@Audited
private String streetName;
@Audited
private Integer houseNumber;
@Audited
private Integer flatNumber;
...
}
{code}
The table {{ADDRESS_AUD}} is being created without any index on columns {{streetName}} and
{{houseNumber}} (corresponding to original index {{idx}}).
Verify the correctness of applying
[@Index|http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/annotations/Index.html]
annotation on fields and methods.
In my opinion two additional configuration parameters shall be added, since only one index
structure with the given name can exist in a single database schema.
Bug report on Hibernate Envers forum:
[
http://community.jboss.org/thread/163497?tstart=0].
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira