-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 8.10, Fast Track (FT)
-
Fix Version/s: 8.10, Fast Track (FT)
-
Component/s: None
-
Tags:
From 8.10, it is not possible to access a coresession outside a transaction. (see NXP-19361).
https://doc.nuxeo.com/810/nxdoc/how-to-implement-local-groups-or-roles-using-computed-groups/
The example should contain a call to TransactionHelp.runInTransaction:
TransactionHelper.runInTransaction(() -> { CoreInstance.doPrivileged(repositoryName, session -> { try (IterableQueryResult results = session.queryAndFetch(query, "NXQL")) { for (Map<String, Serializable> result : results) { String groupId = (String) result.get("ecm:uuid"); groupIds.add(groupId); } } }); });