Hi,
Discussing with Thomas today we think we need to use relative refs in XWikiDocument for
storing the Parent reference and in XObject (BaseCollection to be precise) to store the
XClass reference.
The rationales are:
* the copy wiki use case: Imagine that you've set a relative parent reference in the
UI, you'll want that the copied document retains the relativity
* have the same behavior as relative links in document contents.
* we had this feature and lost it during the reference refactoring in XE 2.2.
Regarding the implementation the idea is to:
* store relative reference using the EntityReference class and to introduce a
RelativeStringEntityReferenceResolver class.
* modify the XWikiDocument's javadoc to deprecate setDocumentReference and all setXXX
that change the reference since XWikiDocument should be immutable re its reference (the
storage impl today doesn't support a XWikiDocument that has its reference that is
modified).
Let me know if you see a problem. I'm starting to implement this.
Thanks
-Vincent