[ http://jira.nhibernate.org/browse/NH-298?page=all ]
Sergey Koshcheyev updated NH-298:
---------------------------------
Fix Version: LATER
Component: Core
Version: 1.2.0.Beta2
> After, deleting an item which belongs to a <list> the list indices are not modified
> -----------------------------------------------------------------------------------
>
> Key: NH-298
> URL: http://jira.nhibernate.org/browse/NH-298
> Project: NHibernate
> Type: Improvement
> Components: Core
> Versions: 1.2.0.Beta2, beta-0.7
> Environment: WindowsXP
> Reporter: Scott Buzan
> Fix For: LATER
>
> Posted: Fri May 27, 2005 5:02 pm Post subject: updating <list> index values when removing children
> --------------------------------------------------------------------------------
> I posted this message to the sourceforge forum...a request was made that I create a JIRA issue.
> I'm using a <list> for one 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: 0,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" 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 for one end of the association...so I changed the parent class to use the <list>. Everything else seems to work fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nhibernate.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
|