Hi,

I'm struggling to write a query to return me the node which has the largest 
amount of children.

For example given : 

root
-A
--a1
--a2
--a3
-B
--b1
--b2
-C
--c1

it should return A (potentially followed by B and then C, but I'm only really 
interested in A).

My current code simply iterates through the Level 1 nodes A,B,C etc and for 
each one run a "//* order by xxx" and gets the getRows().getSize().

However the performance of this is obviously quite bad, but I'm unable to find 
anything like "//* order by jcr:childcount"

Does anyone have any insights into an efficient way to do this? I'm happy to 
use JQOM if that might be easier.

regards

Reply via email to