AEM 6.2 - Creating Query Object of type XPATH | Community
Skip to main content
GK-007
Level 9
June 29, 2016
Solved

AEM 6.2 - Creating Query Object of type XPATH

  • June 29, 2016
  • 1 reply
  • 1025 views

 Hi All,

We are creating Query object using below code.

javax.jcr.query.Query query = queryManager.createQuery(queryString, javax.jcr.query.Query.XPATH);

As  javax.jcr.query.Query.XPATH constant has been deprecated in AEM 6.2,what will be the alternative approach to create query object of type XPATH,

I know it works even though it's deprecated but we want to change the code to comply more with the AEM 6.2

Thanks,

Kishore

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by stevec2515680

Do not use XPaths anymore. Use: 

Query query = builder.createQuery(PredicateGroup.create(map), session);

1 reply

stevec2515680Accepted solution
Level 4
June 29, 2016

Do not use XPaths anymore. Use: 

Query query = builder.createQuery(PredicateGroup.create(map), session);