When deleting a versioned object, it appears that not all of the version information for the object is deleted. This poses a problem for us when the deleted versioned object contained a reference to another object because now we cannot delete the referenced object. This seems like a bug?
Here is the scenario.
- Create two objects A and B.
- Give object B a relationship (e.g., isMemberOfCollection) to object A.
- Create a version of object B.
- Delete object B.
- Attempt to delete object A fails with the following error message:
javax.jcr.nodetype.ConstraintViolationException: The property '/jcr:system/jcr:versionStorage/af/f8/65/aff8653c5b09eb3fdfb3044ef04f315c3d2dc012/1.0/jcr:frozenNode/ns009:isMemberOfCollection_ref' is protected and cannot be removed.