Hibernate version: 3.2.5
Name and version of the database you are using: Oracle 10g
The following use of <list> and <list-index> results in a java.util.List of 7 elements with a null for the 5th. I was expecting a List of *all* 6 elements without the null.
The documentation clearly states that the sort column is expected to be in sequential order. Given that my sort column is not in sequential order how can i modify the behavior of the <list-index> tag to sort *any* list of integers and *not* just sequential integers.
This would seem to be a fairly common behavior of sorting.
any help most appreciated.
Mapping documents:
Code:
<list name="elements" inverse="true" cascade="all">
<key column="article_id"/>
<list-index column="sort_order" />
<one-to-many class="eg.Element"/>
</list>
data:Code:
article_id, sort_order
1013,0
1012,1
1034,2
1112,3
1223,4
2233,6
-lp