i think this is wrong. its moving session dependency into the document manager, and duplicating getDocumentId. and it will only work if the document was already flushed, but not for new managed documents, as UoW::getDocumentId. we should move the logic to handle uuid into getDocumentId and make the uow look in the right places.