Hi,
I'm trying to use the @Index annotation with EJB3 in Hibernate 3.2.6.ga to create
indexes automatically when an entity is deployed. According to the documentation it can be
put either into the @org.hibernate.annotations.Table annotation or directly on the entity
property.
Unfortunately, neither
@javax.persistence.Table(name = "records")
| @org.hibernate.annotations.Table(appliesTo = "records", indexes = {
@Index(name = "IDX", columnNames = { "timestamp" }) })
|
nor@Index(name = "IDX", columnNames = { "timestamp" })
| public Date getTimestamp() {
| return timestamp;
| }
| nor@Index(name = "IDX")
| public Date getTimestamp() {
| return timestamp;
| }
| seem to work.
It does create the table on deploy, creates all the foreign keys associated with the
entity, creates indexes on the foreign key columns, but the indexes specified using @Index
are missing.
Any hints?
Thanks a lot,
Georges
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181591#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...