Joined: Wed Aug 30, 2006 4:38 pm Posts: 1
|
I have a class Camp mapped which two other entities as follows.
- <set name="campGroups" table="CampGroup" lazy="false" inverse="false">
<key column="CampKey" on-delete="noaction" />
<many-to-many class="com.xyz.abc.data.CampGroup" column="CampGroupKey" embed-xml="true" not-found="exception" unique="false" />
</set>
- <set name="Users" table="User" lazy="false" inverse="false">
<key column="CampKey" on-delete="noaction" />
<many-to-many class="com.xyz.abc.data.User" column="UserKey" embed-xml="true" not-found="exception" unique="false" />
</set>
In certain instance i would like to have the lazy false and in certain instance it should be true. Is this possible to dynamically change the lazy flag?
Ideally i would like to set these values before executing the hibernate query and based on the lazy flag which has been dynamically set, the collection should be loaded.
|
|