So I have a datastructure - a sort of List type - that needs to be ordered. When the order is set the elements know what comes before and after them.
When objects are removed from the list, the list isn't updated, the object that is removed just gets new parent id value, so other elements don't know that the element got removed (like they know in typical JAVA LinkedList way, where pointers are updated)
Also when the object is set to another position in the list I'd like to make single updated to the database.
Current solution is using versioning system. So the values for the the ordering algorithm can be 1.1.1 and 1.1.1.1 now when I but and object inbetween them I give it a value of 1.1.1.0.1
Would there be any other (better) system for this problem?