When we delete an entity it should be saved along with its original id, because we use the nitrite generator for ids, it might be possible that once removed from a collection an id can be regenerated, which will cause a conflict when the old object is restored.
Look into how NitriteDb generates Ids.
Possibly write a home brew id generator utilizing GUUID and checking all collections and repositories for objects with that id before returning it as a free possibility.
Note: this is an incredibly niche problem that might not even exists.
When we delete an entity it should be saved along with its original id, because we use the nitrite generator for ids, it might be possible that once removed from a collection an id can be regenerated, which will cause a conflict when the old object is restored.
Look into how NitriteDb generates Ids. Possibly write a home brew id generator utilizing GUUID and checking all collections and repositories for objects with that id before returning it as a free possibility.
Note: this is an incredibly niche problem that might not even exists.