-->
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: Insert drop index sql builder
PostPosted: Fri Sep 12, 2014 9:51 am 
Newbie

Joined: Thu Dec 21, 2006 8:06 am
Posts: 8
Hi,
I'm using hibernate in an unconventionnal way, which is as an helper to generate some sql compatible with any database, mainly thanks to the dialects.
Usually I can find what I want in the Dialect class and subclasses, but I have a problem with the drop index sql builder.

I found it in the org.hibernate.mapping.Index class:

Code:
return "drop index " +
            StringHelper.qualify(
                  table.getQualifiedName( dialect, defaultCatalog, defaultSchema ),
                  name
            );


This piece of code generate code like:
Code:
drop index tableName.indexName

This is valid for some languages, but definiely not for all despie the fact that is takes Dialect as parameter.
For instance a valid synthax for sqlServer would be:
Code:
DROP INDEX index_name ON table_name


Is it a bug? Or have I missed something?

Thank you very much by advance for your help.

Guillaume


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.