Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
hibernate无法在sql server中创建表_Hibernate_Hibernate Mapping - Fatal编程技术网

hibernate无法在sql server中创建表

hibernate无法在sql server中创建表,hibernate,hibernate-mapping,Hibernate,Hibernate Mapping,我正在尝试通过hibernate进行连接,但如果我在sql server中手动创建表,则无法创建表,然后选择、插入和删除查询工作正常,我在hibernate.cfg.xml中使用以下设置 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

我正在尝试通过hibernate进行连接,但如果我在sql server中手动创建表,则无法创建表,然后选择、插入和删除查询工作正常,我在hibernate.cfg.xml中使用以下设置

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

com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc:sqlserver://shokumar-idc\jdeseslocal;databaseName=scart
JDE
JDE
1.
org.hibernate.dialogue.hsql方言
真的
创造

为什么在SQLServer中使用HSQLdialent?我也尝试了使用SQLServer方言(org.hibernate.dialent.sqlserverdialent),但结果相同……在授予权限后,我发现这是SQLServer权限问题,效果很好,非常感谢您的帮助