I have a mapping similar to the following and it seems that the index column is not populated during the DB INSERT statement because the DB complains about index being NULL. However, if I make the index column nullable it works as expected.
Code:
<list name="someList">
<key column="someFk"/>
<list-index column="index"/>
<one-to-many class="SomeClass"/>
</list>
Is there a way to force Hibernate to populate the index while inserting? I'm sure there must be a way but I've looked into the docs and couldn't find anything.
---
I also asked the question on SO:
http://stackoverflow.com/questions/4119 ... list-index