开发者

Set Table character-set/collation using Hibernate Dialect?

I use Hibernate MySQLInnoDB Dialect to generate DDL's.

hibernate.cfg.x开发者_如何学Pythonml :

<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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜