Change Persistence

If you modify the object to which an iterator refers by (*iterator).member_function_call() or (*iterator).data_member = new_value, you should call iterator->_DB_STL_StoreElement() to store the change, otherwise the change would be lost after the iterator moves on to other elements.

If you are storing a sequence, and you modified some part of it, you should also call this function before the iterator moves.

And in both cases, if you specified directdb_get as true (this is the default value), you should call _DB_STL_StoreElement() after the change and before the next iterator movement OR the next dereferencing of the iterator by the star or arrow operators, i.e. iterator::operator* or iterator::operator->, otherwise the change is also lost.

If you update the element by assigning to a dereferenced iterator like this: *iterator = new_element; then you never have to call _DB_STL_StoreElement(), the change is stored to the database automatically.