-->
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.  [ 1 post ] 
Author Message
 Post subject: Indexed lists with no desirable null values
PostPosted: Mon Dec 17, 2007 1:03 pm 
Newbie

Joined: Tue Aug 03, 2004 10:31 am
Posts: 7
Hello, I have de following problem:
I've got an ArrayList mapped as an indexed list (as below) and when I delete an element, the retrieved list, in JAVA, doesn't reset the indexes, so, null values remain in this list. For instance: (e0, e1, null, e3), where e2 (element with index 2) was deleted and replaced for null and my hoped result was: (e0, e1, e3), without nulls.

Note that I can't map it as a Set o a Bag 'cause I really need the order..
How can I resolve it??

Thank you!!


Hibernate version: 3.2

Mapping documents:

Code:
...
//there is a one-to-many relationship between A and B
<class name="A" >
   <list name="list"
      lazy="true"
      cascade="all-delete-orphan">
      <key column="ID_A" not-null="true"/>
      <index column="LIST_IDX" />
      <one-to-many class="B" />      
   </list>
...


[/code]


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

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.