Updating the UI for relational batch deletions
Currently I'm setting
isDeleted: true on the entity being deleted, which allows me to update the UI right away for the immediate action.In places where related data is being fetched (often paginated), however, I don't see a great way to index/filter for this in queries, so filtering the result based on a list of "deleted" foreign keys is my best bet it seems, which could make paginating odd when large chunks or even entire pages are missing in the filtered result.
Just checking to see if I'm missing a better way here.
Obviously the golden ticket here is full on relationship support with cascading deletes, but something that could help in the meantime:
q.in()/q.nin() support for filters. This way I could provide a list of ids to filter out for the foreign key field.