ModeShape/modeshape — pull request #383 by hchiorean (2012-05-22 13:20:21+00:00)
Title: Mode 1453 - Finalized reference implementation

References are now being stored/updated and reference integrity is checked when persisting changes.

To be able to support multiple outbound references from the same node towards another node, the document (persistent structure) was changed: instead of an array of referrer keys, for each referrer and ref type (strong or weak) a document is stored with the referrer key and the number of references. Only when the count reaches 0, is a referrer removed from the document.

The TCK tests around references were enabled and also a couple of other tests were added around reference counting and referential integrity.