...
So....for every relationship use a separate list_ index column. It is a good convention to use the same prefix a as used for the key column the mapping might look . The mapping of grouplayer then looks like this:
Code Block | ||||
---|---|---|---|---|
| ||||
<class name="SharpMap.Layers.GroupLayer, SharpMap" table="grouplayer"> <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="parent_layer_list_index" /> <one-to-many class="SharpMap.Layers.ILayer, SharpMap"/> </list> </class> |