我想在休眠中使用lazy="true" ,同时在JAVA中使用Jersey加载细节。但我得到错误。(hbm 版本 5.1.3.Final)
这是我的代码:
<class name="com.icaube.application.prac.details.PracAccountDetail" table="prac_account_master">
<id column="account_id" name="accountId">
<generator class="com.icube.platform.IdGenerator">
<param name="componentName">PracAccount</param>
</generator>
</id>
//here lazy=true
<many-to-one name="pracRankDetail" class="com.icaube.application.prac.details.PracRankDetail" column="rank_id" lazy="true"/>
<one-to-one name="pracAddressDetail" property-ref="accountId" lazy="false" />
<property column="name" name="name" not-null="true" unique="false"/>
<property column="rank_id" name="rankId" not-null="true" unique="false"/>
</class>
得到错误:
Initial SessionFactory creation failed.org.hibernate.boot.InvalidMappingEelloxception: Could not parse mapping document: PracComponents.hbm.xml (RESOURCE)
这有什么问题?我怎样才能使它正确?
谢谢 :-)