We have some bugs because each time we need a patient document we re-read it from disk/from document access bridge. One example is PT-2786, and another new one is
Instead of patching all those bugs separately with band-aids, we should expose the XWikiDocument directly via agreed upon method name.
will do that on a larger scale, but since we have a bug already the new Entities API methods getXDocument() and getDocumentReference() should be added/exposed in this issue, and getDocument() should be made deprecated.
(as discussed with , , , )