3 ms·
I think it is not difficult to decide: sometimes you want to reference an entity with its current state, some other times you mean with the properties that it
by mrighele 3y ago
I think it is not difficult to decide: sometimes you want to reference an entity with its current state, some other times you mean with the properties that it has at a specific point in time.
For example if I don't pay yearly tax on my car I will receive a fine. The fine may arrive one or two year later, but it should be sent to me even if I sold the car meanwhile, because what matters is that I was the owner at the time.
On the other side, the fine should be sent to my current address, not the one I had when I forgot to pay.
There a number of ways to handle this. The simplest is to make a copy of the data, but you can also decide to keep all the historical data and reference the state during a certain time interval. Both can be valid choices, depending on the context, frequency of change, number of references....