I have an unique constraints on a node
ON ( business:Business ) ASSERT business.domain IS UNIQUE
I am trying to run query
MERGE (u:UserPublishers {domain: prospect.domain})
ON CREATE SET
u.id = prospect.id,
u.created = prospect.created,
u.domain = prospect.domain,
u.name = prospect.name,
u.email = prospect.email,
u += prospect.fields
ON MATCH SET
u += prospect.fields
When I run this I am getting error like
Node(10745858) already exists with label
Businessand property
domain= 'adinject.com'
Is there any other way to achieve the goal
- when the domain is same it will merge with existing and update the other properties?
- when the domain is null is there any way to skip it?
- using apoc periodic iterate is there any way so that it will work partially instead of run it in transaction?