Consider the following mapping:
Mapping of Map and GroupLayer
<subclass name="SharpMap.Layers.GroupLayer, SharpMap" discriminator-value="group"> <list name="Layers" lazy="false" cascade="all" collection- type="DeltaShell.Plugins.Data.NHibernate.Collections.Generic.PersistentEventedListType`1[[SharpMap.Layers.ILayer, SharpMap]], DeltaShell.Plugins.Data.NHibernate"> <key column="parent_layer_id"/> <index column="list_index" /> <one-to-many class="SharpMap.Layers.ILayer, SharpMap"/> </list> </subclass> <class name="Map" table="gis_maps" lazy="false" > <id name="Id" column="id" type="Int64"> <generator class="native" /> </id> <list name="Layers" lazy="false" cascade="all-delete-orphan" collection-type="DeltaShell.Plugins.Data.NHibernate.Collections.Generic.PersistentEventedListType`1[[SharpMap.Layers.ILayer, SharpMap]], DeltaShell.Plugins.Data.NHibernate"> <key column="map_id"/> <index column="list_index" /> <one-to-many class="SharpMap.Layers.ILayer, SharpMap"/> </list> </class>
As you can see both grouplayer and Map have a list of layers (ILayer) when are mapped in a <list> element. This will result in a 'schema' like this: