views:

191

answers:

1

I use Hibernate MySQLInnoDB Dialect to generate DDL's.

hibernate.cfg.xml :

<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>

How can I configure the character-set/Collation to 'utf8_general_ci' for the generated table?

+2  A: 

I had the same requirement before and used this article which provides the solutions in great detail. You need to subclass MySQLInnoDBDialect and override the getTableTypeString method. More in the article.

n002213f
Good to know. Thanks. +1
Adeel Ansari