kwin commented on code in PR #348: URL: https://github.com/apache/jackrabbit-filevault/pull/348#discussion_r1709767267
########## vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java: ########## @@ -1047,8 +1056,38 @@ private void removeReferences(@NotNull Node node) throws ReferentialIntegrityExc } // add remaining mixins (for all import modes) for (String mixin : newMixins) { + Property uuidProp = null; vs.ensureCheckedOut(); - node.addMixin(mixin); + + if (mixin.equals("mix:referenceable") && identifier.isPresent()) { + // if this is mix:ref and ni specifies an identifier, + // try to set it + try { + uuidProp = node.setProperty(Property.JCR_UUID, identifier.get()); Review Comment: isn't the uuid already set through the sysview import? ########## vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java: ########## @@ -989,8 +989,17 @@ private void removeReferences(@NotNull Node node) throws ReferentialIntegrityExc VersioningState vs = new VersioningState(stack, node); Node updatedNode = null; Optional<String> identifier = ni.getIdentifier(); + + String nodeUUID = null; + try { + nodeUUID = node.getUUID(); Review Comment: > Deprecated. As of JCR 2.0, [getIdentifier()](https://developer.adobe.com/experience-manager/reference-materials/spec/javax.jcr/javadocs/jcr-2.0/javax/jcr/Node.html#getIdentifier()) should be used instead. (https://developer.adobe.com/experience-manager/reference-materials/spec/javax.jcr/javadocs/jcr-2.0/javax/jcr/Node.html#getUUID()) I am not understanding how that makes a diference because this is all only relevant if the node supposed to be update/replaced has a uuid and IMHO the return value should be the same for getUUID and getIdentifier in case the node is referenceable right? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org