Hi,
Is there option do not remove old labels when node is saved(merged) ?
Example:
We create specific node with DynamicLabels
@Node("property")
@Getter
@Setter
@Builder
public class DaeDomainPropertyNode {
@Id
@Property("DaeId")
private String name;
@DynamicLabels
private Set<String> labels;
}
Which is used as relationship node for other nodes
Such as
@Node("column")
@Getter
@Setter
@Builder
public class DaeDomainColumnNode {
.....
@Relationship(type = "Has")
private Map<DaeDomainPropertyNode, DaeDomainPropertyRelationship> properties;
......
}
@Node("environment")
@Getter
@Setter
@Builder
public class DaeDomainEnvironmentNode {
.....
@Relationship(type = "Has")
private Map<DaeDomainPropertyNode, DaeDomainPropertyRelationship> properties;
......
}
The DaeDomainEnvironmentNode and DaeDomainColumnNode nodes mark the property node (DaeDomainPropertyNode) with their labels in order to organize the graph traversal in the future by their labels.
If we save the DaeDomainColumnNode, then this save removes the DaeDomainEnvironmentNode labels (in case the properties intersect) and vice versa DaeDomainEnvironmentNode removes DaeDomainColumnNode properties.
P.S.
The code of the DynamicLabels#apply method does not inspire optimism that this is possible in the current version of SDN/RX, but... might it be possible to make configurability in future versions ?