Hi,
in my test project I realized your structure in xml with lazy loading:
Master --> MasterDetails --> MasterDetailDetails
Code:
<class name="ObjectModel.Test.Master, ObjectModel" table="Test_Master">
<id name="Id" type="Int32" column="Id" access="field.pascalcase-m-underscore">
<generator class="hilo">
<param name="table">NH_Key_Test</param>
<param name="column">Test_Master</param>
<param name="max_lo">0</param>
</generator>
</id>
<version name="RowVersion" column="RowVersion" type="Int32" unsaved-value="negative" />
<property name="Description" column="Description" type="String" />
<bag name="masterdetails" inverse="true" cascade="all" lazy="true">
<key column="IdMaster" />
<one-to-many class="ObjectModel.Test.MasterDetail, ObjectModel" />
</bag>
</class>
<class name="ObjectModel.Test.MasterDetail, ObjectModel" table="Test_MasterDetail">
<id name="Id" type="Int32" column="Id" access="field.pascalcase-m-underscore">
<generator class="hilo">
<param name="table">NH_Key_Test</param>
<param name="column">Test_MasterDetail</param>
<param name="max_lo">0</param>
</generator>
</id>
<version name="RowVersion" column="RowVersion" type="Int32" unsaved-value="negative" />
<property name="Description" column="Description" type="String" />
<many-to-one name="Master" column="IdMaster" class="ObjectModel.Test.Master, ObjectModel" cascade="none" />
<bag name="masterdetaildetails" inverse="true" cascade="all" lazy="true">
<key column="IdMasterDetail" />
<one-to-many class="ObjectModel.Test.MasterDetailDetail, ObjectModel" />
</bag>
</class>
<class name="ObjectModel.Test.MasterDetailDetail, ObjectModel" table="Test_MasterDetailDetail">
<id name="Id" type="Int32" column="Id" access="field.pascalcase-m-underscore">
<generator class="hilo">
<param name="table">NH_Key_Test</param>
<param name="column">Test_MasterDetailDetail</param>
<param name="max_lo">0</param>
</generator>
</id>
<version name="RowVersion" column="RowVersion" type="Int32" unsaved-value="negative" />
<property name="Description" column="Description" type="String" />
<many-to-one name="MasterDetail" column="IdMasterDetail" class="ObjectModel.Test.MasterDetail, ObjectModel" cascade="none" />
</class>
You have to create 3 classes reflecting this xml structure and load the collections.
Could you be interested in this kind of solution?
Antonella