So I’m almost done with my app but I have an issue I’m trying to solve. This issue is saving a relation data after the data it’s connected to is deleted.
Here what I’m trying to do. After a user adds a product or products to the bag/cart, then after heading to checkout they would choose they would them confirm payment. After the submit button is hit, I had it set where the bag column’s items/reference would be deleted to clear the cart. This cause an issue.
For my order status table this would remove the relation to the product and other additional info or the seller. How would I go about keeping the data in the bag column from the user will also deleting it?