Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
This conversation has been locked due to inactivity. Please create a new post.
Hi All,
I need to fetch the assets where "jcr:content/metadata/jcr:lastModified is greater than jcr:content/cq:lastReplicated".
Is it possible to compare to two metadata values while querying. Please help me in writing the query for this scenario.
So far I am aware is the daterange predicate which is querying a metadata date property against a specific date.
Thanks,
Selva
I would look at using JCR SQL2 to perform this type of query:
http://labs.6dglobal.com/blog/2014-10-07/9-jcr-sql-2-queries-every-aem-dev-should-know/
https://wiki.magnolia-cms.com/display/WIKI/JCR+Query+Cheat+Sheet
HI Selva123
Did you able to solve the issue?
Pradeep
I don't think so we can compare dynamic operand with another dynamic operand but static values
DynamicOperand Operator StaticOperand
you can try to write simple servlet to achieve this, without writing queries or use Sling Queries instead of JCR queries.
cq5 - JCR SQL2 compare properties on same node - Stack Overflow
Sling Query vs JCR
Views
Likes
Replies