You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to merge two nodes with different labels (for example A and B) based on a property (for example prop1) that is equal for both of them.
See this example:
CREATE CONSTRAINT ON (a:A) ASSERT a.prop1 IS UNIQUE;
CREATE CONSTRAINT ON (a:B) ASSERT a.prop1 IS UNIQUE;
CREATE (a:A) SET a.prop1 = 1;
CREATE (b:B) SET b.prop1 = 1;
MATCH (a:A {prop1:1})
MATCH (b:B {prop1:1})
CALL apoc.refactor.mergeNodes([a, b]) YIELD node RETURN node;
This should merge the properties of both nodes together, without concern for the uniqueness constraint because the endresult is still one node with this specific prop1 value.
The problem is very similar to #762, but in this case the property with the constraint is the same for both labels.
This leads me to believe we might be doing something that is not supported/not the intended use. If so, why is this a bad idea/what should we look into?
Currently the only way we see around it is temporarily dropping the uniqueness constraint and adding it again after merging.
The text was updated successfully, but these errors were encountered:
Expected Behavior (Mandatory)
I want to merge two nodes with different labels (for example A and B) based on a property (for example prop1) that is equal for both of them.
See this example:
This should merge the properties of both nodes together, without concern for the uniqueness constraint because the endresult is still one node with this specific prop1 value.
Actual Behavior (Mandatory)
Unfortunately, this gives an error like
How to Reproduce the Problem
See the example above
Currently used versions
Versions
The problem is very similar to #762, but in this case the property with the constraint is the same for both labels.
This leads me to believe we might be doing something that is not supported/not the intended use. If so, why is this a bad idea/what should we look into?
Currently the only way we see around it is temporarily dropping the uniqueness constraint and adding it again after merging.
The text was updated successfully, but these errors were encountered: