Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jcr:lastModified vs cq:lastModified

Tags:

jcr

aem

What is the significance of having 2 separate last modified dates(jcr:lastModified and cq:lastModified)? Is there a scenario where one of the dates gets updated and second one not. Cant we live with one of the last modified (maybe jcr) and use it everywhere?

My issue is, we have few queries and conditions in our application defined based of either of these dates and am confused if the usage is right.

Here is a sample: enter image description here

like image 400
Saravana Prakash Avatar asked Apr 15 '16 09:04

Saravana Prakash


1 Answers

cq:lastModified is present at jcr:content node level, means it is available on all those nodes whose jcr:primaryType is cq:pageContent. Where as at all other nodes types jcr:lastModified is used. In general we can say that if any content is getting modified through aem functionality it will refer and update cq:lastModified and everything else that is using JCR core functionality will refer and update jcr:lastModified. Both properties can’t be present on the same node.

Read more at WHAT IS THE DIFFERENCE BETWEEN JCR:LASTMODIFIED AND CQ:LASTMODIFIED

like image 69
Khoa Phung Avatar answered Dec 25 '22 08:12

Khoa Phung