Does anyone know why sometimes the node would have 2 additional fields - jcr:lastModified
and jcr:lastModifiedBy
while some nodes don't have these 2 fields?
In JCR the jcr:lastModified and jcr:lastModifiedBy properties are automatically set by the repository when certain changes are made to a node. These properties are used to track when a node was last modified and who made the modification.
The jcr:lastModified property is a date-time value that is set to the current date and time whenever the node's content or properties are modified, or whenever a child node is added or removed from the node. The jcr:lastModifiedBy property is a string value that is set to the username of the user who made the modification.
Not all nodes will have the jcr:lastModified and jcr:lastModifiedBy properties, as these properties are only set when certain changes are made to the node. For example, if a node is created but its content and properties are not modified, the jcr:lastModified and jcr:lastModifiedBy properties will not be set. It is also possible to disable the automatic setting of these properties by modifying the repository's configuration. If the automatic setting of these properties has been disabled, then no nodes in the repository will have the jcr:lastModified and jcr:lastModifiedBy properties.