-->
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.  [ 4 posts ] 
Author Message
 Post subject: hbm.xml
PostPosted: Tue Mar 04, 2008 7:37 am 
Newbie

Joined: Mon Mar 03, 2008 10:07 am
Posts: 2
Hi experts,


If I create an index on a table column, Any chages are required on this mapping file.


regards,
Divakar


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 04, 2008 4:59 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
I guess it depends. Are you having an existing schema and try to use hibernate on top if it? In this case you could just create and index and not 'tell' hibernate about it.

If, however, you want to use hibernate to create your schema via hibernate tools you will have to specify the index via the index property:
Code:
<property name="myProperty" index="myPropertyIndex"/>


Even if you are not planning to use hibernate tools I would consider it a good idea to explicitly specify the index.

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 7:23 am 
Newbie

Joined: Mon Mar 03, 2008 10:07 am
Posts: 2
hardy.ferentschik wrote:
I guess it depends. Are you having an existing schema and try to use hibernate on top if it? In this case you could just create and index and not 'tell' hibernate about it.

If, however, you want to use hibernate to create your schema via hibernate tools you will have to specify the index via the index property:
Code:
<property name="myProperty" index="myPropertyIndex"/>


Even if you are not planning to use hibernate tools I would consider it a good idea to explicitly specify the index.

--Hardy


------------------------------------------------------------------------------


Hello Hardy,

I have existent schema with hibernate mapping file, on that I have created the Index at database levle(ORACLE).

Now how to change the hbm.xml file corresponding to index on a column.

regards,
Divakar


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 4:58 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
I am not quite sure what you mean.
Say your property is called 'foo' and you called the index you've created 'bar' - just add <property name="foo" index="bar"/> to your mapping file.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.