hibernate不懂,在加上eclipse更不懂了!
帮你up

解决方案 »

  1.   

    Set the property hibernate.dialect.
    setdialect
      

  2.   

    参考
    \hibernate.propertieshibernate.dialect net.sf.hibernate.dialect.MySQLDialect
    hibernate.connection.driver_class org.gjt.mm.mysql.Driver
      

  3.   

    如果配置是xml的<property name="dialect">
    net.sf.hibernate.dialect.SQLServerDialect</property>
      

  4.   

    hibernate.properties已经有了,如下:hibernate.dialect net.sf.hibernate.dialect.MySQLDialect
    hibernate.connection.driver_class org.gjt.mm.mysql.Driver
    hibernate.connection.url jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=GBK
    hibernate.connection.username root
    hibernate.connection.password xml文件如下:<?xml version="1.0" encoding="GB2312"?>
    <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
    <hibernate-mapping> <class name="h.Person">
        <!--hibernate为我们生成主键id-->
    <id name = "id" unsaved-value = "null">
    <generator class="uuid.hex"/>
    </id>

        <!--默认把类的变量映射为相同名字的表列,当然我们可以修改其映射方式-->
    <property name="name"/>
    <property name="address"/>
    </class>
    </hibernate-mapping>这是什么原因啊?