Hi again,
replying mostly to help if someone has similar needs and to ask if somebody has good point on doing things this way:
After some thinking and a little bit of prototyping one way to do the wanted thing could be something like that:
- Forget the automatic indexing & ordering with List and make the index column a normal property.
- Handle the indexes manually and do the shift operations with HQL resulting as something like
Code:
update Foo set Foo.index = Foo.index + :shift where index >= :min and index <= :max
Even though legacy databases without much object orientation and with some mass operations don't seem to be the main target of Hibernate but it still seems that Hibernate would save a lots of work with the thing..