final Path path = mergedNode.getPath();
NodeConflictBehavior conflictBehavior = NodeConflictBehavior.UPDATE;
Collection<Property> properties = new ArrayList<Property>(mergedNode.getPropertiesByName().size() + 1);
properties.add(new BasicSingleValueProperty(this.uuidPropertyName, mergedNode.getUuid()));
BasicCreateNodeCommand newNode = new BasicCreateNodeCommand(path, properties, conflictBehavior);
List<Segment> children = mergedNode.getChildren();
GraphCommand[] intoCache = new GraphCommand[1 + children.size()];
int i = 0;
intoCache[i++] = newNode;
List<Property> noProperties = Collections.emptyList();
PathFactory pathFactory = context.getValueFactories().getPathFactory();
for (Segment child : mergedNode.getChildren()) {
newNode = new BasicCreateNodeCommand(pathFactory.create(path, child), noProperties, conflictBehavior);
// newNode.setProperty(new BasicSingleValueProperty(this.uuidPropertyName, mergedNode.getUuid()));
intoCache[i++] = newNode;
}
cacheConnection.execute(context, intoCache);
}