Reference Properties within a Version

When a REFERENCE property is stored as part of the frozen state of a version, the referential integrity requirement is lifted. For example, given the following situation:

Assuming that A is checked in.

When A is checked in, P will be recorded as part of the frozen state of the newly created version A' by being copied to version storage as a property P' of A'.

At this point B cannot be removed from the workspace because it has a reference (P) pointing to it. However, if P is removed from A, then B can be removed. Because referential integrity is not enforced for frozen reference properties in version storage, the reference from P' will not prevent the removal of B. This is despite the fact that P' does appear in the same workspace as B (though only in the special version storage subtree at /jcr:system/jcr:versionStorage). Note that this also means that a call to getReferences on B will not return P'.