-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 2021
-
Component/s: Developer documentation
-
Tags:
-
Backlog priority:100
In https://doc.nuxeo.com/nxdoc/session-and-transaction-management/#session-management the following code is provided to get a core session
UserSession userSession = WebEngine.getActiveContext().getUserSession();
Principal principal = userSession.getPrincipal();
CoreSession session1 = userSession.getCoreSession();
CoreSession session2 = userSession.getCoreSession("myrepo");
But the method "getCoreSession" does not exist on the class UserSession.
The correct code is
CoreSession session =WebEngine.getActiveContext().getCoreSession();
- links to