-->
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: Collation speficfication at column level
PostPosted: Mon Aug 03, 2009 4:27 am 
Regular
Regular

Joined: Tue Feb 17, 2009 5:13 am
Posts: 59
Hi all.

I need to set an specific collation type for DB, so I have overwritten MySQL5InnoDBDialect class.

Code:
import org.hibernate.dialect.MySQL5InnoDBDialect;

public class CustomMysqlDialect extends MySQL5InnoDBDialect {

   public String getTableTypeString() {
        return "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci";
    }
}


But I need a lower level specification due to I have to specify another collation for id columns... Concretely utf8_bin instead of utf8_spanish_ci.

Only for one column in each table. ¿How could I do that? ¿any idea?

Thanks in advance.

_________________
Born to lose... live to win!


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.