in hibernate2.18, i have to table Company and it's Profile,
below is the mapping in Company mapping
<one-to-one name="Profile" class="Profile" property-ref="accCompany" constrained="true" />
and in Profile i set <class
name="Profile"
table="PROFILES"
lazy="true"
>
<many-to-one
name="accCompany"
class="com.tradeeasy.pojos.AccCompany"
not-null="true"
unique="true"
>
<column name="COMP_ID" />
</many-to-one>
but everytime i load company, it's profile was loaded automatically by hibernate. can anybody tell me how can i realize one-to-one lazy load, thanks in advance.
|