我有一個Slab對象的映射,它具有對對象和SlabPDO SlabInstructions的映射引用。我想做選擇,總是攜帶SlabPDO對象並僅在必要時加載SlabInstructions。有沒有辦法做到這一點?下面映射的例子:僅在必要時加載對象
<id name="Id" column="Id_Slab" type="Int64">
<generator class="Geraes.GLib.GDomainBasis.CustomTableHiLoGenerator, GLib.GDomainBasis" />
</id>
<property name="Mill" column="Mill" type="String" length="2" not-null="true" />
<property name="SlabId" column="Slab_Id" type="String" length="20" not-null="true" />
<property name="PieceId" column="Piece_Id" type="String" length="20" not-null="true" />
<one-to-one name="SlabPDO" class="SlabPDO" cascade="all" fetch="join"/>
<set name="SlabInstructions" generic="true" inverse="true" lazy="false" cascade="all" fetch="join">
<key column="Id_Slab" />
<one-to-many class="SlabInstruction"/>
</set>
祝商祺!
您可以將標題翻譯成英文請。 – ChrisF 2012-04-11 10:32:17