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

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

Mark Solution

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

解決済み

How to query current node as well as its descendant nodes?

Avatar

Level 3

Is there any way to query on the current node as well as its descendant nodes based on the below query? I also want to check whether the current node has [jcr:content/cq:lastReplicationAction] = 'Activate'

SELECT DISTINCT page.[jcr:path] FROM [cq:Page] AS page WHERE ISDESCENDANTNODE(page, '/content/') AND page.[jcr:content/cq:lastReplicationAction] = 'Activate'

 

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

Avatar

正解者
Community Advisor

Hi @aemUser2345,

You can try SQL2 query as suggested by @BrianKasingli .

If you want to use QueryBuilder, Please try this.

path=/content/
type=cq:Page
property=jcr:content/cq:lastReplicationAction
property.value=Activate
path.self=true
p.limit=-1

Regards,

Shiv

 

Shiv Prakash

元の投稿で解決策を見る

3 返信

Avatar

Community Advisor and Adobe Champion

Try this

 

SELECT page.[jcr:path] FROM [nt:base] AS page
WHERE ISDESCENDANTNODE(page, '/content/')
AND page.[jcr:content/cq:lastReplicationAction] = 'Activate'

 

Avatar

Level 3

sorry for this query I am still getting the descendant nodes, and unable to get the current node.

Avatar

正解者
Community Advisor

Hi @aemUser2345,

You can try SQL2 query as suggested by @BrianKasingli .

If you want to use QueryBuilder, Please try this.

path=/content/
type=cq:Page
property=jcr:content/cq:lastReplicationAction
property.value=Activate
path.self=true
p.limit=-1

Regards,

Shiv

 

Shiv Prakash