我正在尝试通过hibernate连接,但是如果我通过手动在sql server中创建表,则无法创建表,然后选择,插入和删除查询工作正常,我在hibernate.cfg.xml中使用以下设置< / p>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:sqlserver://shokumar-idc\JDESSELOCAL;databaseName=scart</property>
<property name="hibernate.connection.username">JDE</property>
<property name="connection.password">JDE</property>
<property name="connection.pool_size">1</property>
<property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">create</property>
<mapping class="dao.tables.User" />
<mapping class="dao.tables.Product" />
<mapping class="dao.tables.Orderitems" />
<mapping class="dao.tables.Order" />
<mapping class="dao.tables.Category" />
<mapping class="dao.tables.Config" />
<mapping class="dao.tables.Adminuser" />
<mapping class="dao.tables.Cities" />
</session-factory>
</hibernate-configuration>