Implementation does not copy tombstone data into the parent version. This creates a problem when backtracking through history. A deleted object will not have a stored tombstone transition and can only be identified by looking at nil data.
Storing the tombstone allows for a reconstruction of the history of the object, which is necessary when defining expected behavior for users.
Line 61 just needs:
Tombstone: meta.Version.Tombstone,
Bonus points for adding a complete clone() method for taking care of Version copying. :D
Reference lines - https://github.com/rotationalio/honu/blob/d13a85a7085761866126a4c1beddad74ef989e79/versions.go#L56-L61
Implementation does not copy tombstone data into the parent version. This creates a problem when backtracking through history. A deleted object will not have a stored tombstone transition and can only be identified by looking at nil data.
Storing the tombstone allows for a reconstruction of the history of the object, which is necessary when defining expected behavior for users.
Line 61 just needs:
Tombstone: meta.Version.Tombstone,
Bonus points for adding a complete
clone()
method for taking care of Version copying. :D