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!
Solved! Go to Solution.
Views
Replies
Total Likes
@aemUser2345 ,
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
@aemUser2345 ,
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