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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With