mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Expose database unique node ID as a spoofed property. This can be used as an alternative to the UUID for local uniqueness.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3115 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -770,7 +770,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
ret.put(propertyQName, value);
|
||||
}
|
||||
// spoof referencable properties
|
||||
addReferencableProperties(nodeRef, ret);
|
||||
addReferencableProperties(nodeRef, node.getId(), ret);
|
||||
// done
|
||||
return ret;
|
||||
}
|
||||
@@ -793,6 +793,12 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
|
||||
// get the property from the node
|
||||
Node node = getNodeNotNull(nodeRef);
|
||||
|
||||
if (qname.equals(ContentModel.PROP_NODE_DBID))
|
||||
{
|
||||
return node.getId();
|
||||
}
|
||||
|
||||
Map<QName, PropertyValue> properties = node.getProperties();
|
||||
PropertyValue propertyValue = properties.get(qname);
|
||||
|
||||
|
Reference in New Issue
Block a user