Hello,
using hibernate 2.1.8, with a mapping like this:
Code:
<class name='AssetGroup' ...>
<id...></id>
<map name='assetWeights' table="SE_ASSET_GROUP_WEIGHT" outer-join="true" lazy='false' access='property' cascade='all'>
<key column='asset_group_id'/>
<index-many-to-many class="com.csg.pmnet.as.model.Asset" column="asset_id"/>
<composite-element class="AssetWeight">
<property name='weight' column='initial_weight' access='field'/>
<property name='covered' column='covered' access='field' type='yes_no'/>
<property name='reason' column='reason' access='field'/>
<property name='price' column='initial_price' access='field'/>
<property name='priceCurrency' column='price_ccy' access='field'/>
</composite-element>
</map>
</class>
When I load an AssetGroup, the map from Asset -> AssetWeight is not loaded eagerly but with many separate queries. This leads to bad performance of course.
Is it not possible to use eager fetching (not via HQL but directly using session.load() ) for index-many-to-many maps?
TIA,
Peter