コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

AEM 6.2 - Creating Query Object of type XPATH

Avatar

Level 9

 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

1 受け入れられたソリューション

Avatar

正解者
Level 4

Do not use XPaths anymore. Use: 

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

元の投稿で解決策を見る

1 返信

Avatar

正解者
Level 4

Do not use XPaths anymore. Use: 

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