【发布时间】:2016-11-01 21:30:37
【问题描述】:
在many的文档中我发现我们必须在hibernate.cfg.xml中定义方言来告诉hibernate我们将使用什么语言或hibernate。在此基础上hibernate生成相应的sql。
<property name="hibernate.conection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.dilect">org.hibernate.dialect.MySQLDilect</property>
除此之外,任何数据库提供程序都可能有多个驱动程序,而且任何驱动程序都可能根据其版本有多种方言。
我的意思是,即使我们已经在那里提到了驱动程序(唯一),而且我们是单一版本的 jar,那么为什么这不仅足以生成 sql。
【问题讨论】:
标签: java hibernate hibernate.cfg.xml