1.在生成表文件时,这个type的类型为integer才可以生成在数据库中生成表,但是在后期的操作过程时,你必须改为string,不然的话,会出现错误!!
<class name="roomDetail" table="z_roomDetail">
<id name="id" type="string">
<generator class="native"/>
</id>
<property name="roomNo" type="string"/>
<property name="roomFuction" type="string"/>
<property name="roomDesc" type="string"/>
<property name="roomControlId" type="string"/>
</class>
</hibernate-mapping>
至于什么原因暂时未定,还没有明白!