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]