Hi,
I'm using a <list> for the parent end of a many-to-many association. When I remove an item from the collection the indices are not updated in the database? For example if index 2 is removed, the database will show indices: o,1,3,4,5,...etc.
Parent class mapping:
Code:
<list name="ConceptGroups" table="Application_ConceptGroup" cascade="save-update" lazy="true">
<key column="ApplicationPK"/>
<index column="Position"/>
<many-to-many class="Units.ConceptGroup, Test" column="ConceptGroupPK"></many-to-many>
</list>
Child class mapping:
Code:
<bag name="Applications" table="Application_ConceptGroup" cascade="save-update" inverse="true" lazy="true">
<key column="ConceptGroupPK"/>
<many-to-many class="Application, Test" column="ApplicationPK"></many-to-many>
</bag>
originally both classes were mapped using a <bag>; however, I have to maintain the order of the list in the database...so I changed the parent class to use the <list>.
thanks,
s
Code: