How to change an order in an ordered + saved collection?

I just need to reorder the elements in a (previously saved) ordered collection ...

I tried just passing the redesigned setter collection: after the transaction, the collection disappeared.
Then I tried to clear () the existing collection and addAll () after that: clear () makes the persistent manager mark all elements as deleted. (But, obviously, I would like to be able to work with the elements of the collection in the transaction itself.)

(The collection is not part of the default selection group, so I tried this also with the group with the name selected in the selection plan. No luck.)

This should be the stupidest question, but I ran out of ideas and got stuck here for two days. I swear I'm googled .: (

+3
source share
1 answer

The data order is specified in the index. Unfortunately, the functionality to remove or reset the index does not exist in the present time ( How to remove indexes in the App Engine the Google (the Java)? .

However, a dynamic index change is possible. Take a look at http://rahulswackyworld.blogspot.com/2010/03/dynamic-indexes-with-google-app-engine.html .

+1
source

Source: https://habr.com/ru/post/1746942/


All Articles