


I would like to write a query using JCR-SQL2 to return all component groups.
I tried the following but it is not returning anything:
SELECT * FROM [componentGroup]
Does anyone have any suggestions? Thanks!
Views
Replies
Sign in to like this content
Total Likes
@wenwang1 ,
You have to modify your query a bit, 'componentGroup' is not a valid node type
Use the below query to get the valid nodes
SELECT 'componentGroup' FROM [cq:Component]
add a WHERE ISDESCENDANTNODE clause if you want to get component groups under a specific path
In your code then, you can get the value of 'componentGroup' property if required
@wenwang1 ,
You have to modify your query a bit, 'componentGroup' is not a valid node type
Use the below query to get the valid nodes
SELECT 'componentGroup' FROM [cq:Component]
add a WHERE ISDESCENDANTNODE clause if you want to get component groups under a specific path
In your code then, you can get the value of 'componentGroup' property if required