Open december1981 opened 5 years ago
Hey! We currently have diff_against()
here. Was this not sufficient for your needs?
The problem with this is that it works only between two historical instances. I wanted something that would allow a difference between the current, actual, instance of an object and one of the historical instances (actually, the latest historical instance.)
As mentioned, the actual instance can be different from the latest historical instance, esp. if someone or some process runs an update on an instance instead of saving via save().
Since an ORM "update()" is not the same as an explicit loop and ".save()" over the affected instances (as you note in the docs), we sometimes get differences between between the actual instance and the last created historical instance.
So I was going to make a change and fire off a pull request to add a feature like
pukka_instance.history.diff_against(historical_instance)
(there's currently no way to diff an actual instance with a historical one)
What say thee (before I go ahead with this)?