Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.1
-
None
Description
In the console, if one tries to obtain a QueryManager instance via a HierarchyManager, it's provided with the correct jcr session:
mgnl> q = ctx.getHierarchyManager('config').getQueryManager()
===>
info.magnolia.cms.core.search.QueryManagerImpl@1ee3b2dd
mgnl> q.createQuery("select * from nt:base where contains(*, 'forum-jcr')", "sql")
===>
info.magnolia.cms.core.search.QueryImpl@343b8714
... but if she tries to take the MgnlContext.getQueryManager() shortcut, it isn't:
mgnl> q = ctx.getQueryManager('config')
info.magnolia.cms.core.search.QueryManagerImpl@734a8075
mgnl> q.createQuery("select * from nt:base where contains(*, 'forum-jcr')", "sql")
RepositoryException: corresponding session has been closed
Checklists
Acceptance criteria