开发者

Hibernate: what's the difference between MySQLDialect and MySQLInnoDBDialect?

What's the difference between MySQLDialect and MySQLInnoDBDialect? I've used 开发者_开发百科MySQLDialect ever since, now I wonder how the above are different.

Anyone?


The default storage engine in MySQL is MyISAM. If you need transactions and row-level locking, you often chose InnoDB.

Using MySQLInnoDBDialect, Hibernate appends type=InnoDB to the table creation statement. This explicitly creates an InnoDB table. MySQLDialect does not append an engine string, thus, would create a MyISAM table.

However, you can also change the default storage engine of the MySQL server by using the following line in your my.cnf, MySQL configuration, file.

default-storage-engine=innodb
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜