If we destroy the Questioner what happens to the Questions they've asked? They are either destroyed or not. I don't think destroying them is a good plan because it removes valuable information. However, not destroying them leaves a dangling reference.
One possibility is to not destroy the Questioner, but remove the name, thus making it an anonymous questioner. This let's us keep the references to the questions intact.
Another possibility might be to destroy the Questioner, but create a new anonymous Questioner in its place, and rewrite the Question references.
Both of the above solutions have the problem that logging out doesn't affect the Questioner count like would be expected.
It might also be possible to re-design questions such that there are now two types: AnonymousQuestion and AttributedQuestion. An AnonymousQuestion would not have a reference to a Questioner, while an AttributedQuestion would. When a Questioner logs out, their AttributedQuestions are converted into AnonymousQuestions.
Perhaps less-invasive, would be to change the owner of the references. Questioners could directly reference the Questions they've asked, while Questions themselves wouldn't reference anything. Then deleting a Questioner would not require modifying the Questions at all. This does, however, make question attribution inconvenient.
A couple of questions with this one:
If we destroy the Questioner what happens to the Questions they've asked? They are either destroyed or not. I don't think destroying them is a good plan because it removes valuable information. However, not destroying them leaves a dangling reference.
One possibility is to not destroy the Questioner, but remove the name, thus making it an anonymous questioner. This let's us keep the references to the questions intact.
Another possibility might be to destroy the Questioner, but create a new anonymous Questioner in its place, and rewrite the Question references.
Both of the above solutions have the problem that logging out doesn't affect the Questioner count like would be expected.
It might also be possible to re-design questions such that there are now two types: AnonymousQuestion and AttributedQuestion. An AnonymousQuestion would not have a reference to a Questioner, while an AttributedQuestion would. When a Questioner logs out, their AttributedQuestions are converted into AnonymousQuestions.
Perhaps less-invasive, would be to change the owner of the references. Questioners could directly reference the Questions they've asked, while Questions themselves wouldn't reference anything. Then deleting a Questioner would not require modifying the Questions at all. This does, however, make question attribution inconvenient.