I am using Spring framework to develop a web app and I use Hibernate to support the persistent layer. I already know that I can custom my own dialect with the codes below:
public class MySQL5Dialect extends MySQL5InnoDBDialect {
@Override
public String getTableTypeString() {
return " ENGINE=InnoDB DEFAULT CHARSET=utf8";
}
}
But this applies to all the tables. Now I have different tables with different MySQL storage engines. For example, one table uses InnoDB
and the other uses MyISAM
. How do I accomplish this? Thanks in advance.