-->
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: Strange naming of indexes
PostPosted: Thu Jun 20, 2013 2:48 am 
Newbie

Joined: Wed Jun 19, 2013 5:20 am
Posts: 1
I'm trying to change the way Hibernate names my indexes but cannot find the place where this is done. There seem to be no methods in the various NamingStrategy implementations.
I'm using a table per class inheritance strategy and Hibernate keeps adding the name of the abstract superclass to the index name, making it too long for Oracle (30 characters).

For example,
Code:
@Index(name=TABLE_NAME + "$" + COLUMN_NAME)
results in the index name
Code:
table_nameabstractsuperclass$column_name
The annotation is on the field, not part of the @Table annotation.

Any hint on how to change this behaviour or a link to where this is documented? I've searched the community doc and the manual but didn't find anything. I think it's really strange that Hibernate just changes the name of my index.


I've also posted this querstion on stackoverflow, but had no luck so far:
http://stackoverflow.com/questions/17170209/hibernate-naming-strategy-for-index


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.