I am looking for a way to track an entity after removal. I am sure that this is a common situation. A couple of ways that we are considering are logical deletes or history tables.
The Customer/Order/Product situation (
http://www.hibernate.org/hib_docs/refer ... xamples-s2)
would encounter this problem. What if you wanted to delete Customer or LineItem that was present in an Order but needed to keep the Order (and its Customer and Lineitem information) for history/reporting purposes.
Is there any pattern or solution to this problem?
The only information I could find was the following, but it only seems to handle part of the problem.
[color=blue]... "neat feature: class level WHERE. This allows for example implementing logical delete (delete using a flag) by having hibernate append