Skip to content

#181 Remove dependence on is_deleted for undo/redo

Jaak Kütt requested to merge bugfix/181-undo-with-constraints into main

This diff is a lot, it might be easier to review it commit at a time since I tried to chunk them up into thematic pieces.

Removed dependence on is_deleted, objects and their children will always get deleted from the database, and undo will re-insert all of them in reverse order. Using Visitor pattern to gather up entries for deletion and sorting tables so the entries are deleted and restored to avoid key constraint violations.

This does make deleting entries that have a lot of children slower (since the updates inside a set are running individually instead) - but then again I am assuming that deleting such objects is a rare case.

Edited by Jaak Kütt

Merge request reports