Is it possible to select node ancestors by SQL2 query?
For example
I have: /content/categories/sport/football node
Want to select: /content, /content/categories, /content/categories/sport nodes
JCR: Get all ancestors of current node
484 Views Asked by Normal At
1
There are 1 best solutions below
Related Questions in JCR
- Java JCR is it possible to add '&' into node name
- How to find correct AEM constant class names?
- Node order not preserved sling post servlet
- Streaming data - Heap OOM, JAX-RS
- Magnolia/Jackrabbit JCR - uploading files larger than 1gb
- Moqui Framework - Error: no matching property definition found for {http://www.jcp.org/jcr/1.0}data
- Why does a JCR SQL 2 Query for nt:unstructured also return cq:PageContent nodes?
- ModeShape / JCR InvalidItemStateException blocks DMS
- JCR-SQL2 Select all nodes that have child node with specific property value
- How to query for nodes without children nodes with given name in JCR?
- sling generate html rendition base on virtual jcr or json object
- How to determine source of a third party dependency to resolve warning
- How do I iterate through the nodes of /content and get the value of text property?
- Query All Pages Based on Compoent's Resource Type
- Merge ACS Commons Reports AEM
Related Questions in JCR-SQL2
- JCR-SQL2 Select all nodes that have child node with specific property value
- How to query for nodes without children nodes with given name in JCR?
- Jackrabbit JCR_SQL2: filter on a path of which only part is known
- When I try to convert the pandas DataFrame to Xarray dataset I get this error
- Combine 2 JCR-SQL2 queries to 1 query
- Query All Pages Based on Compoent's Resource Type
- Merge ACS Commons Reports AEM
- Image upload moderation in Jahia
- JCR SQL2 query for an empty multivalued field
- Query JCR SQL2 in Magnolia with a multivalue where-condition
- How can i add an expression to jcr sql2 query?
- Select only particular pages of a template in AEM if that component exist in that page
- Jackrabbit permission issue with JCR API 2.0
- Exclude child path from fulltext search parent path using Querybuilder OR get search hit excerpt from XPATH/JCR SQL2 query
- Escape special characters in JCR SQL2 Query
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can, but assuming you have other siblings at those levels it's not very easy or dynamic. Honestly, it'll probably be far easier and far more performant to just use the
Nodemethods to walk up the ancestors. Remember that you can get theNodeobject(s) for each row in a JCR-SQL2 query result.Alternatively, if you just want the paths to the ancestors, then you can implicitly get these from the path of a result node (e.g.,
/content/categories/sport nodes).