-->
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: hibernate annotations, index on a column
PostPosted: Sat Feb 03, 2007 11:11 am 
Newbie

Joined: Sat Feb 03, 2007 11:02 am
Posts: 1
Hi!

I'd like to index a column. My class mapping looks like that:

Code:
@Entity
@Table(name = "T_PLACE")
public class PlaceDO implements Serializable,ModifyOrRead {
.....

@Index(name = "category_index")
public String getCategory() {
  return this.category
}

...


but there is no index on this column:
Code:
diplom_db=# \d t_place;
                    Table "public.t_place"
       Column       |            Type             | Modifiers
--------------------+-----------------------------+-----------
id                 | bigint                      | not null

............................

category           | character varying(255)      |

.............................

Indexes:
    "t_place_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
    "fk232b53c32aadaf4" FOREIGN KEY (user_id_fk) REFERENCES t_user(id)
    "fk232b53c4afccd16" FOREIGN KEY (lastmodifier_id_fk) REFERENCES t_user(id)
    "fk232b53c5fc39f69" FOREIGN KEY (user_id_fk) REFERENCES t_user(id)

What am i doing wrong?

I am using
Hibernate v 3.2.1
Postgresql v 8.1
sun-jdk v 1.6

Thanks,
Lado


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.