Skip to main content
GK-007
Level 9
Jun 29, 2016 4:52 PM UTC
Solved

AEM 6.2 - Creating Query Object of type XPATH

 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.
stevec2515680Accepted solution
Level 4
Jun 29, 2016 9:35 PM UTC

Do not use XPaths anymore. Use: 

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

1 reply

stevec2515680Accepted solution
Level 4
Jun 29, 2016 9:35 PM UTC

Do not use XPaths anymore. Use: 

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

Translate