Why jcr:uuid is generating after publishing the content? | Community
Skip to main content
Level 6
Aug 23, 2022 8:36 AM UTC
Solved

Why jcr:uuid is generating after publishing the content?

 Above image shows properties of Arctic surfing page before Publishing.

Above Image shows having jcr:uuid after publishing this page.

 

Is jcr:uuid genearte after publishing the page only?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sachin_Arora_
Sachin_Arora_Accepted solution
New Participant
Aug 23, 2022 11:55 AM UTC

5 replies

joerghoh
Employee
Aug 24, 2022 1:20 PM UTC

When you publish a page, a version is created. And when you create a version of a node it will get a jcr:uuid property added.

(of course there are more reasons why a jcr:uuid is added.)

Translate
ManviSharma
Employee
Aug 23, 2022 8:15 PM UTC

Hi,

 

  • The mix:referenceable type has the effect of enforcing, on any node to which it is assigned, the presence of a property called jcr:uuid.

  • The jcr:uuid property is a protected, auto-created, mandatory property. This means that it is created and administered by the system and can only be read (but not changed or deleted) by the client.

  • The job of the jcr:uuid property is to expose the universally unique identifier (UUID) of its node.

  • The UUID of a referenceable node is assigned on node creation (or at least on node persistence) by the system itself.

  • In a given workspace, there is never more than one node with a given UUID, though there may be nodes that are not mix:referenceable and so do not have UUIDs at all.

  • If a node that is not mix:referenceable happens to have a property called jcr:uuid, then this property has no special significance (Note that adding such a property is not recommended: In general, the jcr prefix should be reserved for items defined within the specification, though this restriction may not be enforced by the implementation).

  • A repository implementation may make its workspace root nodes mix:referenceable. If so, then the root node of all workspaces must be referenceable, and all must have the same UUID.

Translate
Sachin_Arora_
New Participant
Aug 23, 2022 9:00 AM UTC

No its not necessary. jcr:uuid property is getting added due to the jcr:mixinTypes = mix:referenceable added on the asset. Assets that are not published also would have jcr:uuid property if mix:referenceable mixinType is present.

Please refer this link for more details related to jcr:uuid :

https://developer.adobe.com/experience-manager/reference-materials/spec/jcr/1.0/4.9_Referenceable_Nodes.html

For testing you can try adding jcr:mixinTypes[Name[]] = mix:referenceable on any nt:unstructured node. Once you save the property, you will see jcr:uuid automatically created for that node.

 

Translate
Level 6
Aug 23, 2022 9:21 AM UTC

@sachin_arora_ 

what is the usecase of mix:referenceable. type.

So if uuid is not mandetory as you said then is there any property to uniquely identify any page or asset in aem.

Translate
Sachin_Arora_
Sachin_Arora_Accepted solution
New Participant
Aug 23, 2022 11:55 AM UTC