Scenario: The "Invoice" has a reference to the class "User". A user object is delete through the user himself or an administrator, but the invoice object still needs a recepient (the user).
The user object could be marked as deleted instead of delete it physically. But I think it is a bad design to use an object, that is marked as deleted. In my opinion objects should only be archived for legal requirements after deletion but not used regularly.
To remove them physically makes some things easier: cascading deletes, selects, database backups ...
How can I avoid using objects marked as deleted? What design do I need to be able to remove unused objects physically from the database? Are there best-practises?
Context: OOP (DDD) application based on Java EE and a relational database.