I have a mapping for the Slab object that has the mapping references
to objects and SlabPDO SlabInstructions. I would like to do selects,
always carry the object SlabPDO and load SlabInstructions only when
necessary. Is there any way to do this? Below an example of mapping:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="PCT.Domain" namespace="Gerdau.PCT.Kernel.Domain" >
<typedef class="uNhAddIns.UserTypes.TrimString, uNHAddIns"
name="TrimString" />
<class name="Slab" table="P_Slab" lazy="false" dynamic-
update="true">
<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>
Best Regards!
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.