April 6, 2020
Estimated Post Reading Time ~

Creating a unique identifier for a node in JCR apart from path.

If you ever want to create a unique identifier for a node in JCR, you would’ve to add a mixin type [mix:referenceable] to it. Once you add this mixin, the repository creates a UUID (Unique Identifier) for the node automatically.

You could use javax.jcr.Session.getNodeByIdentifier(String):Node to retrieve the referenced node with the UUID.

Do note that path in JCR is always unique.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.