-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem mit Indizes in @Table Annotation
PostPosted: Mon Oct 27, 2008 8:12 am 
Newbie

Joined: Mon Oct 27, 2008 7:58 am
Posts: 3
Hallo,

ich versuche zusätzliche Indizes auf einer MySQL-Datenbanktabelle zu ersetllen. Der Code sieht (ausschnittsweise) aus wie folgt:


Code:
@Entity
@javax.persistence.Table(name = "tb_myTable")
@org.hibernate.annotations.Table(appliesTo = "tb_myTable", fetch=FetchMode.JOIN, indexes={ @Index(name="my_idx", columnNames={"field","another"}) } )

public class MyClass {
   private double field;
   private double another;
   ....
   
   @Column
   public double getField() {
      return field;
   }

   public void setField(double field) {
      this.field = field;
   }

   @Column
   public double getAnother() {
      return another;
   }

   public void setAnother(double another) {
      this.another = another;
   }
       ...
}


Wenn ich jetzt per show index from tb_myTable nachsehe, ob der Index erstellt wurde, so muss ich feststellen, dass dies nicht der Fall ist.

Wo liegt das Problem, laut Dokumentationen, die ich gelesen habe kann man die @Table - Annotation aus der JPA problemlos mit der @Table-Annotation von Hibernate ergänzen.

Danke schonmal im voraus.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.