a LinkedList's order can be persisted by using something like <list-index column="sortOrder"/>
now i am looking for a way to keep the order in a LinkedHashMap
i have this code now:
Code:
<map name="quoteItems" table="priceQuote_priceQuoteItem" cascade="save-update">
<key column="priceQuote"/>
<index column="kkey" type="string"/>
<many-to-many column="priceQuoteItem" class="myPackage.PriceQuoteItem"/>
</map>
i have found i can set a order-by attribute to the map that does a SQL ordering.
but the trouble is that when saving that map, the column with the order isn't populated ... is there a way to to do this automatically ?