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" }) })
  | 
[EMAIL PROTECTED](name = "IDX", columnNames = { "timestamp" })
  | public Date getTimestamp() {
  |     return timestamp;
  | }
  | [EMAIL PROTECTED](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#4181591

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181591
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to