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: Unable to create index using "update"
PostPosted: Thu Jan 17, 2008 4:58 am 
Newbie

Joined: Thu Jan 17, 2008 4:54 am
Posts: 1
Hi All,

we are using



JBoss-4.2.2 .GA that contains hibernate 3.2 jar

Postgre SQL 8.2



We are using specification of EJB 3.0



Applying @org.hibernate.annotations.Index (name = " fk", columnNames = "coloum Name of Related table") on relationship object



eg:- we have a class department having one-to-many relationship with employees

Now Inside Department Class



@Entity

public class Department

{



@OneToMany

(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = " mDepartment ")

@Index(name = "fykeyDpt ", columnNames = "mDepartment")

public List<Employee> emp;



}



On database level we want index in employee table.



It is working fine and creating index with the below settings in persistence.xml.

<property value=" create-drop " name="hibernate.hbm2ddl.auto" />

But the problem is that if we are changing the value=update then no index is created.

f.i. As per our project requirement we have to stick with update.



If some body having the solution or any alternative solution for creating index please let us know.



Thaks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 20, 2008 7:19 am 
Beginner
Beginner

Joined: Mon Sep 12, 2005 3:27 am
Posts: 48
Exactly the same problem here. Does anybody knows if a jira entry or workaround exists already ?


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.