Reputation: 965
I have table mapping in .hbm.xml file as follows. when i set lazy loading to false , it is not working. It is fire lots of select query to db to load other table.
<class name="GroupConfigDO" table="GROUP_CONFIG" >
<composite-id >
<key-property name="Group" column="group" type="java.lang.String" />
<key-many-to-one name="Method" column="method" class="MethodDO" lazy="false" />
<key-property name="entityId" column="entity_id" type="java.lang.String" />
</composite-id>
How can i provide fetch type to join and lazy loading to false?
Upvotes: 2
Views: 1497
Reputation: 2102
use
fetch="select|subselect|join|batch"
and select appropriate association that you required
Upvotes: 1