首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

初用hibernate遇到的CGLIB Enhancement failed有关问题

2012-08-08 
初用hibernate遇到的CGLIB Enhancement failed问题?xml version1.0 encodingutf-8?!DOCTYPE hibe

初用hibernate遇到的CGLIB Enhancement failed问题
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
    <class name="Device" table="device" schema="dbo" catalog="nmsDB">
        <id name="id" type="long">
            <column name="device_id" precision="18" scale="0" />
            <generator />
        </id>
        <property name="mac" type="string">
            <column name="mac" length="255" unique="true"/>
        </property>
        <property name="ip" type="string">
            <column name="ip" length="50" unique="true"/>
        </property>
        <property name="hardVersion" type="string">
            <column name="hardVersion" length="50"/>
        </property>
        <property name="softVersion" type="string">
            <column name="softVersion" length="50" />
        </property>
                <many-to-one name="deviceModel" lazy="no-proxy" column="deviceModelID"
            class="com.jiuzhou.nms.boundles.commonModule.domain.commonDomain.DeviceModel"/>
              </class>
</hibernate-mapping>
查询此类时,发现如果将lazy设为"no-proxy",将会报错CGLIB Enhancement failed;如果将lazy设为false,就没有问题,怎么回事啊?

热点排行