-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: updating <list> index values when removing children
PostPosted: Fri May 27, 2005 1:02 pm 
Newbie

Joined: Fri May 27, 2005 12:49 pm
Posts: 1
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:


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 4:59 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Looks like a bug to me, can you please create a JIRA issue so that we can get to investigate it later?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.