I just need to change order of items in a (previously persisted) ordered collection...
I tried simply passing the re-arranged collection to a setter: after committing a transaction the collection is gone.
Then I tried to clear() the existing collection and addAll() afterwards: clear() makes persistent manager to mark all the elements as deleted. (But obviously I would like to be able to work with the collection items in the very transaction.)
(The collection is not in a default fetch group, so I tried the above also with the named fetch group added into the fetch plan. No luck.)
This must be the most stupid question, but I ran out of ideas and I'm stuck here two days already. I swear I googled. :(