Hi Majorbyte,
There are a few different options here. I believe you could instead define the Item property to be fixed. With a Fixed behavior, each version of A will maintain a reference to a specific version of B. Doing this, when you purge instance A back to a previous generation, it will no longer be referencing the latest generation of B. It will be referencing the same generation of B that it did when the new version of A was created.
An alternative solution would be to add an onBefore server event to ItemType B that updates any references to the latest generation of B to the previous generation. I believe you would want to use an onBeforeDelete server event and add a check to make sure that the action is purge using code like.
string action = this.getAction();
if (action == "purge") {
// Update references to previous generation
}
Chris
Christopher Gillis
Aras Labs Software Engineer