New ask Hacker News story: Alternative to Soft Delete. Again
Alternative to Soft Delete. Again
3 by hexwit | 0 comments on Hacker News.
Hi all, so it is clear that soft delete hard to implement correctly and in general it is evil. Usually the main reason for it is to preserve referenced data. For example we have invoice and customer. We want to see this relation even if customer was deleted. One of the approach is the customer snapshot stored in the invoice object. I want to discuss this approach. So imagine we have have such invoice with customer snapshot, and invoice is editable (not paid). What if I want to update customer's name? I will update name in snapshot? In original record? Both? It is interesting to hear your thoughts.
3 by hexwit | 0 comments on Hacker News.
Hi all, so it is clear that soft delete hard to implement correctly and in general it is evil. Usually the main reason for it is to preserve referenced data. For example we have invoice and customer. We want to see this relation even if customer was deleted. One of the approach is the customer snapshot stored in the invoice object. I want to discuss this approach. So imagine we have have such invoice with customer snapshot, and invoice is editable (not paid). What if I want to update customer's name? I will update name in snapshot? In original record? Both? It is interesting to hear your thoughts.
Comments
Post a Comment