I am curious how some other people handled this.
Imagine a system in which there are only products, purchase orders and purchase order lines. Purchase orders are the parent-child relationship to the purchase order lines. Purchase order lines, refer to one product.
This works until you uninstall the product referenced by the purchase order line. Suddenly Line knows that he is selling something 30 ... but that does not know that.
What a good way to anticipate the removal of a data link part like this? I suppose you could just prohibit the removal of a product if any lines of purchase orders refer to it, but that sounds ... awkward. I assume that, most likely, you will save the purchase order in the database for many years, essentially welding the product you want to delete into your database.
source
share