-->
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.  [ 2 posts ] 
Author Message
 Post subject: @Index not creating indexes (JPA)
PostPosted: Wed Aug 13, 2008 10:46 am 
Newbie

Joined: Wed Dec 26, 2007 9:36 am
Posts: 7
A simple @Index annotation is not working in my code. Any idea guys? The table is generated properly, but not indexes. Will appreciate your comments.

Code:

@Entity
public class Entry {
   @Id
   @GeneratedValue
   private long id;
   @Index(name="start_index")
   private long start;
   @Index(name="end_index")
   private long end;
...
getters/setters
}


I am using Hibernate 3.2.1.ga and Postgres 8.2.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 13, 2008 10:52 am 
Senior
Senior

Joined: Tue Jul 25, 2006 9:05 am
Posts: 163
Location: Stuttgart/Karlsruhe, Germany
Hi,

What do you have the hbm2ddl task set to ? if it is set to auto then no indexes will be created.

Cheers,

Andy

_________________
Rules are only there to be broken


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

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.